function createTable(table, transaction = db.knex, tableSpec = schema[table]) {
    return transaction.schema.createTable(table, function (t) {
        Object.keys(tableSpec)
            .filter(column => !(column.startsWith('@@')))
            .forEach(column => addTableColumn(table, t, column, tableSpec[column]));

        if (tableSpec['@@INDEXES@@']) {
            tableSpec['@@INDEXES@@'].forEach(index => t.index(index));
        }
        if (tableSpec['@@UNIQUE_CONSTRAINTS@@']) {
            tableSpec['@@UNIQUE_CONSTRAINTS@@'].forEach(unique => t.unique(unique));
        }
    });
}
Adds a table according to the provided spec, or falls back to the current schema

NOTE: this function does NOT check if the table already exists - use the migration
utils if you want that

@param {String} table - name of the table to create
@param {import('knex').Knex} [transaction] - connection to the DB
@param {Object} [tableSpec] - table schema to generate table with