mirror of https://github.com/nocodb/nocodb
Pranav C
2 years ago
3 changed files with 39 additions and 1 deletions
@ -0,0 +1,34 @@ |
|||||||
|
import type { Knex } from 'knex'; |
||||||
|
import { MetaTable } from '../../meta.service' |
||||||
|
|
||||||
|
const up = async (knex: Knex) => { |
||||||
|
await knex.schema.alterTable(MetaTable.BASES, (table) => { |
||||||
|
table.string('description', 255); |
||||||
|
}); |
||||||
|
await knex.schema.alterTable(MetaTable.MODELS, (table) => { |
||||||
|
table.string('description', 255); |
||||||
|
}); |
||||||
|
await knex.schema.alterTable(MetaTable.VIEWS, (table) => { |
||||||
|
table.string('description', 255); |
||||||
|
}); |
||||||
|
await knex.schema.alterTable(MetaTable.COLUMNS, (table) => { |
||||||
|
table.string('description', 255); |
||||||
|
}); |
||||||
|
}; |
||||||
|
|
||||||
|
const down = async (knex) => { |
||||||
|
await knex.schema.alterTable(MetaTable.BASES, (table) => { |
||||||
|
table.dropColumn('description'); |
||||||
|
}); |
||||||
|
await knex.schema.alterTable(MetaTable.MODELS, (table) => { |
||||||
|
table.dropColumn('description'); |
||||||
|
}); |
||||||
|
await knex.schema.alterTable(MetaTable.VIEWS, (table) => { |
||||||
|
table.dropColumn('description'); |
||||||
|
}); |
||||||
|
await knex.schema.alterTable(MetaTable.COLUMNS, (table) => { |
||||||
|
table.dropColumn('description'); |
||||||
|
}); |
||||||
|
}; |
||||||
|
|
||||||
|
export { up, down }; |
Loading…
Reference in new issue