fix: add missing migration
authorxangelo <me@xangelo.ca>
Wed, 6 Sep 2023 17:31:04 +0000 (13:31 -0400)
committerxangelo <me@xangelo.ca>
Wed, 6 Sep 2023 17:31:04 +0000 (13:31 -0400)
migrations/20230906155222_monster-variants.ts [new file with mode: 0644]

diff --git a/migrations/20230906155222_monster-variants.ts b/migrations/20230906155222_monster-variants.ts
new file mode 100644 (file)
index 0000000..7e863f9
--- /dev/null
@@ -0,0 +1,16 @@
+import { Knex } from "knex";
+
+
+export async function up(knex: Knex): Promise<void> {
+  return knex.schema.alterTable('fight', function(table) {
+    table.string('variant').defaultTo(null);
+  });
+}
+
+
+export async function down(knex: Knex): Promise<void> {
+  return knex.schema.alterTable('fight', function(table) {
+    table.dropColumn('variant');
+  });
+}
+