2017-03-27 17:39:08 +03:00
|
|
|
'use strict';
|
|
|
|
|
|
2020-04-19 00:40:23 +02:00
|
|
|
exports.up = function (knex, promise) {
|
2018-06-29 10:47:06 +03:00
|
|
|
return knex.schema
|
2020-04-19 00:40:23 +02:00
|
|
|
.createTable('migration_test_2', function (t) {
|
2018-06-29 10:47:06 +03:00
|
|
|
t.increments();
|
|
|
|
|
t.string('name');
|
|
|
|
|
})
|
2018-07-09 08:10:34 -04:00
|
|
|
.then(() =>
|
2020-04-19 00:40:23 +02:00
|
|
|
knex.schema.createTable('migration_test_2_1', function (t) {
|
2017-03-27 17:39:08 +03:00
|
|
|
t.increments();
|
|
|
|
|
t.string('name');
|
2018-06-29 10:47:06 +03:00
|
|
|
})
|
|
|
|
|
);
|
2017-03-27 17:39:08 +03:00
|
|
|
};
|
|
|
|
|
|
2020-04-19 00:40:23 +02:00
|
|
|
exports.down = function (knex, promise) {
|
2018-07-09 08:10:34 -04:00
|
|
|
return knex.schema
|
|
|
|
|
.dropTable('migration_test_2')
|
2018-06-29 10:47:06 +03:00
|
|
|
.then(() => knex.schema.dropTable('migration_test_2_1'));
|
2018-07-09 08:10:34 -04:00
|
|
|
};
|