Add a column to this model's table.
Optionaloptions: QueryInterfaceOptionsRemove a column from this model's table.
Optionaloptions: QueryInterfaceOptionsChange a column's definition.
Optionaloptions: QueryInterfaceOptionsRename a column.
Optionaloptions: QueryInterfaceOptionsAdd an index to this model's table.
OptionalfieldsOrOptions: string[] | IndexFieldDefinition[] | IndexOptions & QueryInterfaceOptionsOptionaloptions: IndexOptions & QueryInterfaceOptionsRemove an index by name.
Optionaloptions: QueryInterfaceOptionsList this model's indexes.
Whether an index exists on this model's table.
Create a full-text index; table defaults to this model.
Add a constraint to this model's table.
OptionalconstraintOrOptions: ConstraintDefinitionOptionaloptions: QueryInterfaceOptionsRemove a constraint by name.
OptionaltypeOrOptions: string | QueryInterfaceOptionsList this model's constraints.
List the foreign keys on this model's table.
Whether this model's table exists in the database.
Rename this model's table. Does not update the model's own tableName.
Optionaloptions: QueryInterfaceOptionsTurn row-level security on for this model's table.
Turn row-level security off.
Create a policy on this model's table; table defaults to this model.
Drop a policy from this model's table.
Optionaloptions: { ifExists?: boolean }Create a trigger on this model's table; table defaults to this model.
Drop a trigger from this model's table.
Optionaloptions: { ifExists?: boolean }Create a partition of this model's table; parentTable defaults to it.
Attach an existing table as a partition of this model's table.
Detach a partition from this model's table.
Drop a partition of this model's table.
Optionaloptions: { ifExists?: boolean; cascade?: boolean } & QueryInterfaceOptionsDescribe this model's table as the database reports it.
Schema operations available on every model.
Each mirrors the
QueryInterfacemethod of the same name with the table argument removed.