Takes the function passed to the "createTable" or "table/editTable" functions and calls it with the "TableBuilder" as both the context and the first argument. Inside this function we can specify what happens to the method, pushing everything we want to do onto the "allStatements" array,
Convert the current tableBuilder object "toSQL" giving us additional methods if we're altering rather than creating the table.
Renames the current column from the current
TODO: this.column(from).rename(to)
TODO: changeType
Drop a column from the current table. TODO: Enable this.column(columnName).drop();
Each of the index methods can be called individually, with the column name to be used, e.g. table.unique('column').
Key specific
Warn if we're not in MySQL, since that's the only time these three are supported.
Each of the column types that we can add, we create a new ColumnBuilder instance and push it onto the statements array.
Numeric
Date / Time
String
Increments, Aliases, and Additional
For each of the column methods, create a new "ColumnBuilder" interface, push it onto the "allStatements" stack, and then return the interface, with which we can add indexes, etc.
The "timestamps" call is really a compound call to set the
created_at and updated_at columns.
Set the comment value for a table, they're only allowed to be called once per table.
Set a foreign key on the table, calling `table.foreign('column_name').references('column').on('table').onDelete()... Also called from the ColumnBuilder context when chaining.
TableBuilder