From 34d64f8ffc043c00f5da963369e5f9023c24574c Mon Sep 17 00:00:00 2001 From: xangelo Date: Fri, 29 Sep 2023 12:17:02 -0400 Subject: [PATCH] fix: add missing migration --- migrations/20230929141329_location_levels.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 migrations/20230929141329_location_levels.ts diff --git a/migrations/20230929141329_location_levels.ts b/migrations/20230929141329_location_levels.ts new file mode 100644 index 0000000..e712f0b --- /dev/null +++ b/migrations/20230929141329_location_levels.ts @@ -0,0 +1,16 @@ +import { Knex } from "knex"; + + +export async function up(knex: Knex): Promise { + return knex.schema.alterTable('locations', function(table) { + table.integer('min_level').defaultTo(1); + }); +} + + +export async function down(knex: Knex): Promise { + return knex.schema.alterTable('locations', function(table) { + table.dropColumn('min_level'); + }); +} + -- 2.25.1