diff --git a/db/migrations/legacy/20221108007023_water-return-versions.js b/db/migrations/legacy/20221108007023_water-return-versions.js index e477186470..6db865a83a 100644 --- a/db/migrations/legacy/20221108007023_water-return-versions.js +++ b/db/migrations/legacy/20221108007023_water-return-versions.js @@ -21,7 +21,6 @@ exports.up = function (knex) { table.boolean('multiple_upload').notNullable().defaultTo(false) table.text('notes') table.integer('created_by') - table.jsonb('mod_log').notNullable().defaultTo({}) // Legacy timestamps table.timestamp('date_created', { useTz: false }).notNullable().defaultTo(knex.fn.now()) diff --git a/db/migrations/legacy/20240807142828_water-notes.js b/db/migrations/legacy/20221108007037_water-notes.js similarity index 100% rename from db/migrations/legacy/20240807142828_water-notes.js rename to db/migrations/legacy/20221108007037_water-notes.js diff --git a/db/migrations/public/20240809164102_alter-return-versions-view.js b/db/migrations/public/20240809164102_alter-return-versions-view.js deleted file mode 100644 index 23b4dadc75..0000000000 --- a/db/migrations/public/20240809164102_alter-return-versions-view.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict' - -const viewName = 'return_versions' - -exports.up = function (knex) { - return knex - .schema - .dropViewIfExists(viewName) - .createView(viewName, (view) => { - view.as(knex('return_versions').withSchema('water').select([ - 'return_version_id AS id', - 'licence_id', - 'version_number AS version', - 'start_date', - 'end_date', - 'status', - 'external_id', - 'reason', - 'multiple_upload', - 'notes', - 'created_by', - 'mod_log', - 'date_created AS created_at', - 'date_updated AS updated_at' - ])) - }) -} - -exports.down = function (knex) { - return knex - .schema - .dropViewIfExists(viewName) - .createView(viewName, (view) => { - view.as(knex('return_versions').withSchema('water').select([ - 'return_version_id AS id', - 'licence_id', - 'version_number AS version', - 'start_date', - 'end_date', - 'status', - 'external_id', - 'reason', - 'multiple_upload', - 'notes', - 'created_by', - 'date_created AS created_at', - 'date_updated AS updated_at' - ])) - }) -}