add Column
Adds a new column to an existing table.
This function generates and executes an ALTER TABLE ... ADD COLUMN ... SQL statement. The column's definition (name, data type, constraints) is derived from the provided newKQLiteColumn object.
Example
// Adds a new 'email' column to the 'Users' table.
// Assuming the `Users` table object now includes an `email` column definition.
// ALTER TABLE `Users` ADD COLUMN `email` TEXT NOT NULL DEFAULT '';
schema
.alterTable(Users)
.addColumn(Users.email)Content copied to clipboard
Author
MOHAMMAD AZIM ANSARI
Parameters
new KQLite Column
The KQLiteColumn object representing the new column to be added. Its properties will be used to construct the column definition in the SQL statement.