Skip to main content

StepKind

Enum StepKind 

Source
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§

Source§

impl Clone for StepKind

Source§

fn clone(&self) -> StepKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for StepKind

Source§

impl Debug for StepKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for StepKind

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for StepKind

Source§

impl Hash for StepKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for StepKind

Source§

fn eq(&self, other: &StepKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for StepKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for StepKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.