|
|
|
@ -1,21 +1,31 @@
|
|
|
|
|
const up = async (knex) => { |
|
|
|
|
await knex.schema.dropTable('nc_plugins'); |
|
|
|
|
await knex.schema.dropTable('nc_disabled_models_for_role'); |
|
|
|
|
await knex.schema.dropTable('nc_shared_views'); |
|
|
|
|
await knex.schema.dropTable('nc_projects_users'); |
|
|
|
|
await knex.schema.dropTable('nc_roles'); |
|
|
|
|
await knex.schema.dropTable('nc_hooks'); |
|
|
|
|
await knex.schema.dropTable('nc_cron'); |
|
|
|
|
await knex.schema.dropTable('nc_acl'); |
|
|
|
|
await knex.schema.dropTable('nc_models'); |
|
|
|
|
await knex.schema.dropTable('nc_relations'); |
|
|
|
|
await knex.schema.dropTable('nc_routes'); |
|
|
|
|
await knex.schema.dropTable('nc_resolvers'); |
|
|
|
|
await knex.schema.dropTable('nc_loaders'); |
|
|
|
|
await knex.schema.dropTable('nc_rpc'); |
|
|
|
|
await knex.schema.dropTable('nc_audit'); |
|
|
|
|
await knex.schema.dropTable('nc_migrations'); |
|
|
|
|
await knex.schema.dropTable('nc_projects'); |
|
|
|
|
const tablesToDrop = [ |
|
|
|
|
'nc_plugins', |
|
|
|
|
'nc_disabled_models_for_role', |
|
|
|
|
'nc_shared_views', |
|
|
|
|
'nc_projects_users', |
|
|
|
|
'nc_roles', |
|
|
|
|
'nc_hooks', |
|
|
|
|
'nc_cron', |
|
|
|
|
'nc_acl', |
|
|
|
|
'nc_models', |
|
|
|
|
'nc_relations', |
|
|
|
|
'nc_routes', |
|
|
|
|
'nc_resolvers', |
|
|
|
|
'nc_loaders', |
|
|
|
|
'nc_rpc', |
|
|
|
|
'nc_audit', |
|
|
|
|
'nc_migrations', |
|
|
|
|
'nc_projects', |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
// check if table exist and remove if exist
|
|
|
|
|
for (const table of tablesToDrop) { |
|
|
|
|
const tableExist = await knex.schema.hasTable(table); |
|
|
|
|
if (tableExist) { |
|
|
|
|
await knex.schema.dropTable(table); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const down = async (_knex) => {}; |
|
|
|
|