drop Column
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")Content copied to clipboard
Author
MOHAMMAD AZIM ANSARI
Parameters
old Column Name
The name of the column to be dropped.