Drop Column
The dropcolumn
method allows you to remove one or more columns from an existing table.
Usage
To drop columns, use the dropcolumn
key inside an altertable
definition. Provide an array of strings, where each string is the name of a column to be dropped.
{
"_id": "1.4.0",
"altertable": {
"users": {
"dropcolumn": ["age", "last_login"]
}
}
}
In this example, the age
and last_login
columns will be removed from the users
table.