mirror of
https://github.com/knex/knex.git
synced 2025-07-23 00:42:45 +00:00

* Add test for drop-and-recreate with async/await * Add some tests with schema * Use correct migrations * Add tests with promise chains for comparison * Fix migration * Fix Node 6 compatibility
17 lines
382 B
JavaScript
17 lines
382 B
JavaScript
exports.up = (knex) => {
|
|
return knex.schema
|
|
.withSchema('dummy_schema')
|
|
.table('old_users', function(table) {
|
|
table.dropColumn('officeId');
|
|
})
|
|
.then(() => {
|
|
return knex.schema
|
|
.withSchema('dummy_schema')
|
|
.table('old_users', function(table) {
|
|
table.string('officeId', 255);
|
|
});
|
|
});
|
|
};
|
|
|
|
exports.down = (knex) => {};
|