From 393cf38299bf7fe2d072b190284f3e11133e5ebd Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 16 Oct 2024 17:19:58 +0200 Subject: [PATCH] Made revision scene ID nullable to facilitate scene removal. --- migrations/20241016171648_revision_nullable.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 migrations/20241016171648_revision_nullable.js diff --git a/migrations/20241016171648_revision_nullable.js b/migrations/20241016171648_revision_nullable.js new file mode 100644 index 00000000..422fe559 --- /dev/null +++ b/migrations/20241016171648_revision_nullable.js @@ -0,0 +1,15 @@ +exports.up = async (knex) => { + await knex.schema.alterTable('scenes_revisions', (table) => { + table.integer('scene_id') + .nullable() + .alter(); + }); +}; + +exports.down = async (knex) => { + await knex.schema.alterTable('scenes_revisions', (table) => { + table.integer('scene_id') + .notNullable() + .alter(); + }); +};