mirror of
https://github.com/knex/knex.git
synced 2025-07-13 12:00:55 +00:00
15 lines
407 B
JavaScript
15 lines
407 B
JavaScript
![]() |
exports.up = async (knex) => {
|
||
|
await knex.raw('CREATE SCHEMA dummy_schema');
|
||
|
await knex.schema
|
||
|
.withSchema('dummy_schema')
|
||
|
.createTable('old_users', (table) => {
|
||
|
table.string('name');
|
||
|
table.string('officeId');
|
||
|
});
|
||
|
};
|
||
|
|
||
|
exports.down = async (knex) => {
|
||
|
await knex.schema.withSchema('dummy_schema').dropTable('old_users');
|
||
|
await knex.raw('DROP SCHEMA dummy_schema CASCADE');
|
||
|
};
|