From 7cda2b5a93b1749d936299d6448a1bd6373c0d75 Mon Sep 17 00:00:00 2001 From: Bruce Bolt Date: Wed, 22 May 2024 13:46:52 +0100 Subject: [PATCH] Migrate non-editionable worldwide organisations to be editionable This migrates non-editionable worldwide organisations and all their attributes to be editionable. An integrity check of the migrated content (comparing Publishing API presenter output) is carried out for all things that are migrated. If any part of the integrity checks fail, the entire transaction will rollback and the migration will fail. Note 1: this migration is irreversible. Note 2: there are some legacy worldwide organisations that were created prior to some validations being put in place, therefore they have invalid values. The migration is skipping validations where necessary (using different strategies, as required) to ensure the values are unchanged when migrating over. Users will be alerted to the invalid content next time they edit the document. Note 3: we cannot use a data migration as they do not have access to presenters and helpers that are needed to perform the consistency check before commiting the transaction. --- db/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/schema.rb b/db/schema.rb index 6ad156dff1c1..ff054cdd832a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_05_29_103123) do +ActiveRecord::Schema[7.1].define(version: 2024_05_31_104433) do create_table "assets", charset: "utf8mb3", force: :cascade do |t| t.string "asset_manager_id", null: false t.string "variant", null: false