Allows us to force consumers to do exactly one alteration to a column.
One cannot do no alterations:
awaitdb.schema .alterTable('person') // .execute() // Property 'execute' does not exist on type 'AlteredColumnBuilder'.
awaitdb.schema .alterTable('person') // .alterColumn('age', (ac) => ac) // Type 'AlterColumnBuilder' is not assignable to type 'AlteredColumnBuilder'. // .execute()
One cannot do multiple alterations:
awaitdb.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.
Allows us to force consumers to do exactly one alteration to a column.
One cannot do no alterations:
One cannot do multiple alterations:
Which would now throw a compilation error, instead of a runtime error.