From: xangelo Date: Fri, 29 Sep 2023 16:17:02 +0000 (-0400) Subject: fix: add missing migration X-Git-Tag: v0.4.1~1 X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=34d64f8ffc043c00f5da963369e5f9023c24574c;p=risinglegends.git fix: add missing migration --- 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'); + }); +} +