dropColumn

abstract fun dropColumn(oldColumnName: String)

Drops an existing column from a table.

This function generates and executes an ALTER TABLE ... DROP COLUMN ... SQL statement to remove the specified column from the table.

Example

// Drops the 'age' column from the 'Users' table.
// Assuming the `age` property has been removed from the `Users` table object.

// ALTER TABLE `Users` DROP COLUMN `age`;
schema
.alterTable(Users)
.dropColumn("age")

Author

MOHAMMAD AZIM ANSARI

Parameters

oldColumnName

The name of the column to be dropped.

See also