Module

data.schema.operations

Schema operations — the diff output that generates SQL.

Classes

CreateTable 2
Create a new table.

Create a new table.

Attributes

Name Type Description
name str
sql str
DropTable 1
Drop an existing table.

Drop an existing table.

Attributes

Name Type Description
name str
AddColumn 5
Add a column to an existing table.

Add a column to an existing table.

Attributes

Name Type Description
table str
name str
type str
nullable bool
default str | None
DropColumn 2
Drop a column from an existing table.

Drop a column from an existing table.

Attributes

Name Type Description
table str
name str
CreateIndex 4
Create a new index.

Create a new index.

Attributes

Name Type Description
name str
table str
columns tuple[str, ...]
unique bool
DropIndex 1
Drop an existing index.

Drop an existing index.

Attributes

Name Type Description
name str