mirror of
https://github.com/knex/knex.git
synced 2025-11-23 13:36:19 +00:00
22 lines
497 B
JavaScript
22 lines
497 B
JavaScript
'use strict';
|
|
|
|
exports.up = function (knex, promise) {
|
|
return knex.schema
|
|
.createTable('migration_test_2', function (t) {
|
|
t.increments();
|
|
t.string('name');
|
|
})
|
|
.then(() =>
|
|
knex.schema.createTable('migration_test_2_1', function (t) {
|
|
t.increments();
|
|
t.string('name');
|
|
})
|
|
);
|
|
};
|
|
|
|
exports.down = function (knex, promise) {
|
|
return knex.schema
|
|
.dropTable('migration_test_2')
|
|
.then(() => knex.schema.dropTable('migration_test_2_1'));
|
|
};
|