alembic_pg_autogen.ops

Custom MigrateOperation subclasses for PostgreSQL objects.

Module Contents

Classes

CreateFunctionOp

Create a new PostgreSQL function.

ReplaceFunctionOp

Replace an existing PostgreSQL function with a new definition.

DropFunctionOp

Drop an existing PostgreSQL function.

CreateTriggerOp

Create a new PostgreSQL trigger.

ReplaceTriggerOp

Replace an existing PostgreSQL trigger with a new definition.

DropTriggerOp

Drop an existing PostgreSQL trigger.

CreateViewOp

Create a new PostgreSQL view.

ReplaceViewOp

Replace an existing PostgreSQL view with a new definition.

DropViewOp

Drop an existing PostgreSQL view.

API

class alembic_pg_autogen.ops.CreateFunctionOp(desired: alembic_pg_autogen.inspect.FunctionInfo)

Bases: alembic.operations.ops.MigrateOperation

Create a new PostgreSQL function.

Initialization

desired: alembic_pg_autogen.inspect.FunctionInfo = None
reverse() alembic_pg_autogen.ops.DropFunctionOp

Reverse is dropping the newly created function.

to_diff_tuple() tuple[str, str, str, str]

Return a hashable tuple for debugging and comparison.

class alembic_pg_autogen.ops.ReplaceFunctionOp(current: alembic_pg_autogen.inspect.FunctionInfo, desired: alembic_pg_autogen.inspect.FunctionInfo)

Bases: alembic.operations.ops.MigrateOperation

Replace an existing PostgreSQL function with a new definition.

Initialization

current: alembic_pg_autogen.inspect.FunctionInfo = None
desired: alembic_pg_autogen.inspect.FunctionInfo = None
reverse() alembic_pg_autogen.ops.ReplaceFunctionOp

Reverse is replacing with the old definition.

to_diff_tuple() tuple[str, str, str, str]

Return a hashable tuple for debugging and comparison.

class alembic_pg_autogen.ops.DropFunctionOp(current: alembic_pg_autogen.inspect.FunctionInfo)

Bases: alembic.operations.ops.MigrateOperation

Drop an existing PostgreSQL function.

Initialization

current: alembic_pg_autogen.inspect.FunctionInfo = None
reverse() alembic_pg_autogen.ops.CreateFunctionOp

Reverse is recreating the dropped function.

to_diff_tuple() tuple[str, str, str, str]

Return a hashable tuple for debugging and comparison.

class alembic_pg_autogen.ops.CreateTriggerOp(desired: alembic_pg_autogen.inspect.TriggerInfo)

Bases: alembic.operations.ops.MigrateOperation

Create a new PostgreSQL trigger.

Initialization

desired: alembic_pg_autogen.inspect.TriggerInfo = None
reverse() alembic_pg_autogen.ops.DropTriggerOp

Reverse is dropping the newly created trigger.

to_diff_tuple() tuple[str, str, str, str]

Return a hashable tuple for debugging and comparison.

class alembic_pg_autogen.ops.ReplaceTriggerOp(current: alembic_pg_autogen.inspect.TriggerInfo, desired: alembic_pg_autogen.inspect.TriggerInfo)

Bases: alembic.operations.ops.MigrateOperation

Replace an existing PostgreSQL trigger with a new definition.

Initialization

current: alembic_pg_autogen.inspect.TriggerInfo = None
desired: alembic_pg_autogen.inspect.TriggerInfo = None
reverse() alembic_pg_autogen.ops.ReplaceTriggerOp

Reverse is replacing with the old definition.

to_diff_tuple() tuple[str, str, str, str]

Return a hashable tuple for debugging and comparison.

class alembic_pg_autogen.ops.DropTriggerOp(current: alembic_pg_autogen.inspect.TriggerInfo)

Bases: alembic.operations.ops.MigrateOperation

Drop an existing PostgreSQL trigger.

Initialization

current: alembic_pg_autogen.inspect.TriggerInfo = None
reverse() alembic_pg_autogen.ops.CreateTriggerOp

Reverse is recreating the dropped trigger.

to_diff_tuple() tuple[str, str, str, str]

Return a hashable tuple for debugging and comparison.

class alembic_pg_autogen.ops.CreateViewOp(desired: alembic_pg_autogen.inspect.ViewInfo)

Bases: alembic.operations.ops.MigrateOperation

Create a new PostgreSQL view.

Initialization

desired: alembic_pg_autogen.inspect.ViewInfo = None
reverse() alembic_pg_autogen.ops.DropViewOp

Reverse is dropping the newly created view.

to_diff_tuple() tuple[str, str, str]

Return a hashable tuple for debugging and comparison.

class alembic_pg_autogen.ops.ReplaceViewOp(current: alembic_pg_autogen.inspect.ViewInfo, desired: alembic_pg_autogen.inspect.ViewInfo)

Bases: alembic.operations.ops.MigrateOperation

Replace an existing PostgreSQL view with a new definition.

Initialization

current: alembic_pg_autogen.inspect.ViewInfo = None
desired: alembic_pg_autogen.inspect.ViewInfo = None
reverse() alembic_pg_autogen.ops.ReplaceViewOp

Reverse is replacing with the old definition.

to_diff_tuple() tuple[str, str, str]

Return a hashable tuple for debugging and comparison.

class alembic_pg_autogen.ops.DropViewOp(current: alembic_pg_autogen.inspect.ViewInfo)

Bases: alembic.operations.ops.MigrateOperation

Drop an existing PostgreSQL view.

Initialization

current: alembic_pg_autogen.inspect.ViewInfo = None
reverse() alembic_pg_autogen.ops.CreateViewOp

Reverse is recreating the dropped view.

to_diff_tuple() tuple[str, str, str]

Return a hashable tuple for debugging and comparison.