pub enum StepKind {
Show 129 variants
CreateSchema,
DropSchema,
AlterSchemaComment,
CreateTable,
DropTable,
AlterTableSetComment,
AddColumn,
DropColumn,
AlterColumnType,
SetColumnNullable,
SetColumnDefault,
SetColumnComment,
SetColumnIdentity,
SetColumnGenerated,
SetColumnStorage,
SetColumnCompression,
AddConstraint,
AddConstraintNotValid,
ValidateConstraint,
DropConstraint,
SetConstraintComment,
CreateIndex,
CreateIndexConcurrent,
DropIndex,
DropIndexConcurrent,
CreateSequence,
DropSequence,
AlterSequence,
AddCheckForNotNull,
CreateView,
DropView,
AlterViewSetCheckOption,
CreateMaterializedView,
DropMaterializedView,
RefreshMaterializedView,
AlterViewSetReloption,
CommentOnView,
CreateType,
DropType,
AlterTypeAddValue,
AlterTypeRenameValue,
AlterDomainAddConstraint,
AlterDomainDropConstraint,
AlterDomainSetDefault,
AlterDomainSetNotNull,
AlterTypeAddAttribute,
AlterTypeDropAttribute,
AlterTypeAlterAttributeType,
CommentOnType,
CreateOrReplaceFunction,
DropFunction,
CommentOnFunction,
CreateOrReplaceProcedure,
DropProcedure,
CommentOnProcedure,
CreateExtension,
DropExtension,
AlterExtensionUpdate,
CommentOnExtension,
CreateTrigger,
DropTrigger,
CommentOnTrigger,
AttachPartition,
DetachPartition,
CreateRole,
DropRole,
AlterRole,
GrantRoleMembership,
RevokeRoleMembership,
CommentOnRole,
CreateTablespace,
DropTablespace,
AlterTablespaceOwner,
SetTablespaceOptions,
CommentOnTablespace,
AlterObjectOwner,
GrantObjectPrivilege,
RevokeObjectPrivilege,
GrantColumnPrivilege,
RevokeColumnPrivilege,
AlterDefaultPrivileges,
CreatePolicy,
DropPolicy,
AlterPolicy,
SetTableRowSecurity,
SetTableForceRowSecurity,
SetTableStorage,
SetIndexStorage,
SetMaterializedViewStorage,
CreatePublication,
DropPublication,
ReplacePublication,
AlterPublicationAddTable,
AlterPublicationDropTable,
AlterPublicationSetTable,
AlterPublicationAddSchema,
AlterPublicationDropSchema,
AlterPublicationSetPublish,
AlterPublicationSetViaRoot,
CommentOnPublication,
CreateSubscription,
DropSubscription,
AlterSubscriptionConnection,
AlterSubscriptionAddPublication,
AlterSubscriptionDropPublication,
AlterSubscriptionSetOptions,
CommentOnSubscription,
CreateStatistic,
DropStatistic,
ReplaceStatistic,
AlterStatisticSetTarget,
CommentOnStatistic,
CreateCollation,
DropCollation,
RenameCollation,
ReplaceCollation,
CommentOnCollation,
CreateEventTrigger,
DropEventTrigger,
AlterEventTriggerEnable,
AlterEventTriggerOwner,
CommentOnEventTrigger,
CreateAggregate,
DropAggregate,
AlterAggregateOwner,
CommentOnAggregate,
CreateCast,
DropCast,
CommentOnCast,
}Expand description
What kind of operation a RawStep performs.
Serialized via serde as the kind= value in the plan’s
-- @pgevolve step ... directive comments (spec §7.1). The
snake_case rename keeps the on-disk form stable across renames here.
Variants§
CreateSchema
CREATE SCHEMA.
DropSchema
DROP SCHEMA.
AlterSchemaComment
COMMENT ON SCHEMA.
CreateTable
CREATE TABLE.
DropTable
DROP TABLE.
AlterTableSetComment
COMMENT ON TABLE.
AddColumn
ALTER TABLE ... ADD COLUMN.
DropColumn
ALTER TABLE ... DROP COLUMN.
AlterColumnType
ALTER TABLE ... ALTER COLUMN ... TYPE.
SetColumnNullable
ALTER TABLE ... ALTER COLUMN ... SET/DROP NOT NULL.
SetColumnDefault
ALTER TABLE ... ALTER COLUMN ... SET/DROP DEFAULT.
SetColumnComment
COMMENT ON COLUMN.
SetColumnIdentity
ALTER TABLE ... ALTER COLUMN ... ADD/DROP IDENTITY.
SetColumnGenerated
ALTER TABLE ... ALTER COLUMN ... SET/DROP EXPRESSION.
SetColumnStorage
ALTER TABLE ... ALTER COLUMN ... SET STORAGE.
SetColumnCompression
ALTER TABLE ... ALTER COLUMN ... SET COMPRESSION.
AddConstraint
ALTER TABLE ... ADD CONSTRAINT (validated immediately).
AddConstraintNotValid
ALTER TABLE ... ADD CONSTRAINT ... NOT VALID.
ValidateConstraint
ALTER TABLE ... VALIDATE CONSTRAINT.
DropConstraint
ALTER TABLE ... DROP CONSTRAINT.
SetConstraintComment
COMMENT ON CONSTRAINT.
CreateIndex
CREATE INDEX.
CreateIndexConcurrent
CREATE INDEX CONCURRENTLY.
DropIndex
DROP INDEX.
DropIndexConcurrent
DROP INDEX CONCURRENTLY.
CreateSequence
CREATE SEQUENCE.
DropSequence
DROP SEQUENCE.
AlterSequence
ALTER SEQUENCE.
AddCheckForNotNull
Intermediate ADD CONSTRAINT __pgevolve_chk_<col> CHECK (col IS NOT NULL) NOT VALID
step in the SET NOT NULL pattern (spec §6.5).
CreateView
CREATE [OR REPLACE] VIEW.
DropView
DROP VIEW.
AlterViewSetCheckOption
CREATE OR REPLACE VIEW … WITH [LOCAL|CASCADED] CHECK OPTION (no
direct ALTER; pgevolve re-issues the full definition).
CreateMaterializedView
CREATE MATERIALIZED VIEW ... WITH NO DATA.
DropMaterializedView
DROP MATERIALIZED VIEW.
RefreshMaterializedView
REFRESH MATERIALIZED VIEW [CONCURRENTLY].
AlterViewSetReloption
ALTER VIEW ... SET (...).
CommentOnView
COMMENT ON VIEW / MATERIALIZED VIEW / COLUMN for views and MVs.
CreateType
CREATE TYPE (enum, domain, or composite).
DropType
DROP TYPE.
AlterTypeAddValue
ALTER TYPE … ADD VALUE.
AlterTypeRenameValue
ALTER TYPE … RENAME VALUE.
AlterDomainAddConstraint
ALTER DOMAIN … ADD CONSTRAINT … CHECK (…).
AlterDomainDropConstraint
ALTER DOMAIN … DROP CONSTRAINT.
AlterDomainSetDefault
ALTER DOMAIN … SET DEFAULT / DROP DEFAULT.
AlterDomainSetNotNull
ALTER DOMAIN … SET NOT NULL / DROP NOT NULL.
AlterTypeAddAttribute
ALTER TYPE … ADD ATTRIBUTE.
AlterTypeDropAttribute
ALTER TYPE … DROP ATTRIBUTE.
AlterTypeAlterAttributeType
ALTER TYPE … ALTER ATTRIBUTE … TYPE.
CommentOnType
COMMENT ON TYPE / COMMENT ON DOMAIN.
CreateOrReplaceFunction
CREATE OR REPLACE FUNCTION.
DropFunction
DROP FUNCTION.
CommentOnFunction
COMMENT ON FUNCTION.
CreateOrReplaceProcedure
CREATE OR REPLACE PROCEDURE.
DropProcedure
DROP PROCEDURE.
CommentOnProcedure
COMMENT ON PROCEDURE.
CreateExtension
CREATE EXTENSION [IF NOT EXISTS] name [WITH SCHEMA s] [VERSION 'v'].
DropExtension
DROP EXTENSION name CASCADE. Destructive (intent required).
AlterExtensionUpdate
ALTER EXTENSION name UPDATE TO 'v'.
CommentOnExtension
COMMENT ON EXTENSION name IS '...'.
CreateTrigger
CREATE [CONSTRAINT] TRIGGER name ... ON table ....
DropTrigger
DROP TRIGGER name ON table.
CommentOnTrigger
COMMENT ON TRIGGER name ON table IS '...'.
AttachPartition
ALTER TABLE parent ATTACH PARTITION child FOR VALUES ....
DetachPartition
ALTER TABLE parent DETACH PARTITION child.
CreateRole
CREATE ROLE.
DropRole
DROP ROLE.
AlterRole
ALTER ROLE … WITH <options>.
GrantRoleMembership
GRANT role TO member.
RevokeRoleMembership
REVOKE role FROM member.
CommentOnRole
COMMENT ON ROLE.
CreateTablespace
CREATE TABLESPACE.
DropTablespace
DROP TABLESPACE — destructive.
AlterTablespaceOwner
ALTER TABLESPACE … OWNER TO ….
SetTablespaceOptions
ALTER TABLESPACE … SET (…).
CommentOnTablespace
COMMENT ON TABLESPACE.
AlterObjectOwner
ALTER <kind> qname OWNER TO new_owner.
GrantObjectPrivilege
GRANT priv ON <kind> qname TO grantee [WITH GRANT OPTION].
RevokeObjectPrivilege
REVOKE priv ON <kind> qname FROM grantee.
GrantColumnPrivilege
GRANT priv (col, …) ON TABLE qname TO grantee [WITH GRANT OPTION].
RevokeColumnPrivilege
REVOKE priv (col, …) ON TABLE qname FROM grantee.
AlterDefaultPrivileges
ALTER DEFAULT PRIVILEGES FOR ROLE x [IN SCHEMA y] GRANT/REVOKE priv ON … TO/FROM z.
CreatePolicy
CREATE POLICY name ON table ….
DropPolicy
DROP POLICY name ON table.
AlterPolicy
ALTER POLICY name ON table TO … USING (…) WITH CHECK (…).
SetTableRowSecurity
ALTER TABLE qname { ENABLE | DISABLE } ROW LEVEL SECURITY.
SetTableForceRowSecurity
ALTER TABLE qname { FORCE | NO FORCE } ROW LEVEL SECURITY.
SetTableStorage
ALTER TABLE qname SET (fillfactor = …, …).
SetIndexStorage
ALTER INDEX qname SET (fillfactor = …, …).
SetMaterializedViewStorage
ALTER MATERIALIZED VIEW qname SET (fillfactor = …, …).
CreatePublication
CREATE PUBLICATION ….
DropPublication
DROP PUBLICATION …. Destructive (intent required).
ReplacePublication
DROP PUBLICATION old; CREATE PUBLICATION new; — mode swap. Destructive.
AlterPublicationAddTable
ALTER PUBLICATION p ADD TABLE x [(cols)] [WHERE (filter)].
AlterPublicationDropTable
ALTER PUBLICATION p DROP TABLE x.
AlterPublicationSetTable
ALTER PUBLICATION p SET TABLE x (cols) WHERE (filter).
AlterPublicationAddSchema
ALTER PUBLICATION p ADD TABLES IN SCHEMA s (PG 15+).
AlterPublicationDropSchema
ALTER PUBLICATION p DROP TABLES IN SCHEMA s (PG 15+).
AlterPublicationSetPublish
ALTER PUBLICATION p SET (publish = '...').
AlterPublicationSetViaRoot
ALTER PUBLICATION p SET (publish_via_partition_root = ...).
CommentOnPublication
COMMENT ON PUBLICATION p IS '...'.
CreateSubscription
CREATE SUBSCRIPTION ….
DropSubscription
DROP SUBSCRIPTION …. Destructive (intent required).
AlterSubscriptionConnection
ALTER SUBSCRIPTION s CONNECTION '...'.
AlterSubscriptionAddPublication
ALTER SUBSCRIPTION s ADD PUBLICATION p.
AlterSubscriptionDropPublication
ALTER SUBSCRIPTION s DROP PUBLICATION p.
AlterSubscriptionSetOptions
ALTER SUBSCRIPTION s SET (option = value, …) — sparse-delta.
CommentOnSubscription
COMMENT ON SUBSCRIPTION s IS '...'.
CreateStatistic
CREATE STATISTICS ….
DropStatistic
DROP STATISTICS …. Destructive (intent required).
ReplaceStatistic
DROP STATISTICS old; CREATE STATISTICS new; — structural change. Destructive.
AlterStatisticSetTarget
ALTER STATISTICS s SET STATISTICS n.
CommentOnStatistic
COMMENT ON STATISTICS s IS '...'.
CreateCollation
CREATE COLLATION qname (...).
DropCollation
DROP COLLATION qname — destructive.
RenameCollation
ALTER COLLATION qname RENAME TO new_name.
ReplaceCollation
DROP COLLATION old; CREATE COLLATION new; — structural change.
CommentOnCollation
COMMENT ON COLLATION qname IS '...'.
CreateEventTrigger
CREATE EVENT TRIGGER name ON event [WHEN TAG IN (...)] EXECUTE FUNCTION fn();.
DropEventTrigger
DROP EVENT TRIGGER name; — destructive.
AlterEventTriggerEnable
ALTER EVENT TRIGGER name {ENABLE|DISABLE|ENABLE REPLICA|ENABLE ALWAYS};.
AlterEventTriggerOwner
ALTER EVENT TRIGGER name OWNER TO role;.
CommentOnEventTrigger
COMMENT ON EVENT TRIGGER name IS '...';.
CreateAggregate
CREATE AGGREGATE qname(argtypes) (SFUNC = …, STYPE = …);.
DropAggregate
DROP AGGREGATE qname(argtypes);.
AlterAggregateOwner
ALTER AGGREGATE qname(argtypes) OWNER TO role;.
CommentOnAggregate
COMMENT ON AGGREGATE qname(argtypes) IS '...';.
CreateCast
CREATE CAST (source AS target) …;.
DropCast
DROP CAST (source AS target);.
CommentOnCast
COMMENT ON CAST (source AS target) IS '...';.
Trait Implementations§
impl Copy for StepKind
Source§impl<'de> Deserialize<'de> for StepKind
impl<'de> Deserialize<'de> for StepKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for StepKind
impl StructuralPartialEq for StepKind
Auto Trait Implementations§
impl Freeze for StepKind
impl RefUnwindSafe for StepKind
impl Send for StepKind
impl Sync for StepKind
impl Unpin for StepKind
impl UnsafeUnpin for StepKind
impl UnwindSafe for StepKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more