exports.up = async (knex) => { // using async/await lets you work with multiple tables in one up/down await knex.schema.createTable('<%= table %>', (table) => { table.increments('id'); table.timestamps(true, true); // example of how to do a foreign key to a table table.integer('poster_id').notNullable(); table.foreign('poster_id').references('id').inTable('user'); }); // because this is an async it'll automatically be a promise for knex // add any other tables here with an await, no need to return }; exports.down = async (knex) => { await knex.schema.dropTable('<%= table %>'); };