Last Updated: 3/9/2026
Class AlteredColumnBuilder
Allows us to force consumers to do exactly one alteration to a column.
One cannot do no alterations:
await db.schema .alterTable('person') // .execute() // Property 'execute' does not exist on type 'AlteredColumnBuilder'.
await db.schema .alterTable('person') // .alterColumn('age', (ac) => ac) // Type 'AlterColumnBuilder' is not assignable to type 'AlteredColumnBuilder'. // .execute()
One cannot do multiple alterations:
await db.schema .alterTable('person') // .alterColumn('age', (ac) => ac.dropNotNull().setNotNull()) // Property 'setNotNull' does not exist on type 'AlteredColumnBuilder'. // .execute()
Which would now throw a compilation error, instead of a runtime error.
Implements
Index
Constructors
Methods
Constructors
constructor
Parameters
Returns AlteredColumnBuilder
Methods
toOperationNode
Returns AlterColumnNode
Implementation of OperationNodeSource.toOperationNode
Settings
On This Page
Generated using TypeDoc