QAlterEnumColumnOptions
@quik/database / QAlterEnumColumnOptions
Type Alias: QAlterEnumColumnOptions
QAlterEnumColumnOptions =
object
Defined in: database/src/migrations/utils/enum.ts:8
Options for alterEnumColumn.
Properties
column
column:
string
Defined in: database/src/migrations/utils/enum.ts:16
Column to alter.
constraintName?
optionalconstraintName?:string
Defined in: database/src/migrations/utils/enum.ts:35
CHECK constraint name backing a non-native Postgres enum column.
Defaults to Knex's default naming convention ({table}_{column}_check); pass this explicitly if the original migration used a custom name.
default?
optionaldefault?:string
Defined in: database/src/migrations/utils/enum.ts:43
Default value to reapply. Only used to rebuild the column definition on MySQL.
nativeType?
optionalnativeType?:boolean
Defined in: database/src/migrations/utils/enum.ts:26
Whether the column was originally created as a native Postgres enum type (table.enum(column, values, { useNative: true, enumName })).
Defaults to false, matching Knex's default table.enum() behavior on Postgres, which backs the column with a CHECK constraint instead.
Ignored on dialects other than Postgres.
nullable?
optionalnullable?:boolean
Defined in: database/src/migrations/utils/enum.ts:39
Whether the column allows NULL. Only used to rebuild the column definition on MySQL. Defaults to true.
table
table:
string
Defined in: database/src/migrations/utils/enum.ts:12
Table containing the enum column.
typeName?
optionaltypeName?:string
Defined in: database/src/migrations/utils/enum.ts:30
Native Postgres enum type name. Required when nativeType is true; must match the name the column was originally created with.
values
values:
string[]
Defined in: database/src/migrations/utils/enum.ts:20
Full set of allowed values after the alteration.