Constructor
new AlterTable()
Methods
(async) execute() → {Any}
Executes the prepared querry
Returns:
- Type:
- Any
selectDatabase(database) → {this}
Selects a database for this query
Parameters:
| Name | Type | Description |
|---|---|---|
database | String | Name of the database |
Returns:
- Type:
- this
structure(struc) → {this}
The new desired structure. - Drops columns that are existing in the current table but not in this structure - Adds columns that are missing in the current table - Modifies all other columns where at least one datatype is not matching
Parameters:
| Name | Type | Description |
|---|---|---|
struc | Structure | New structure for the table |
Returns:
- Type:
- this