mirror of
https://github.com/rajnandan1/kener.git
synced 2026-06-23 04:10:22 +00:00
17 lines
483 B
TypeScript
17 lines
483 B
TypeScript
import type { Knex } from "knex";
|
|
|
|
export async function up(knex: Knex): Promise<void> {
|
|
const hasCol = await knex.schema.hasColumn("monitors", "monitor_settings_json");
|
|
if (!hasCol) {
|
|
await knex.schema.alterTable("monitors", (table) => {
|
|
table.text("monitor_settings_json").nullable();
|
|
});
|
|
}
|
|
}
|
|
|
|
export async function down(knex: Knex): Promise<void> {
|
|
await knex.schema.alterTable("monitors", (table) => {
|
|
table.dropColumn("monitor_settings_json");
|
|
});
|
|
}
|