AlterTable

Prepares a new alteration of a table

Constructor

new AlterTable()

Methods

(async) execute() → {Any}

Executes the prepared querry
Returns:
Type: 
Any

selectDatabase(database) → {this}

Selects a database for this query
Parameters:
NameTypeDescription
databaseStringName 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:
NameTypeDescription
strucStructureNew structure for the table
Returns:
Type: 
this