dockge/backend/migrations/2023-10-20-0829-setting-table.ts
Louis Lam 5f70fa6baf wip
2023-10-23 19:30:58 +08:00

14 lines
436 B
TypeScript

import { Knex } from "knex";
export async function up(knex: Knex): Promise<void> {
return knex.schema.createTable("setting", (table) => {
table.increments("id");
table.string("key", 200).notNullable().unique().collate("utf8_general_ci");
table.text("value");
table.string("type", 20);
});
}
export async function down(knex: Knex): Promise<void> {
return knex.schema.dropTable("setting");
}