-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename about us pages bulk content type
This is specific to published about us pages, per the definition of `about_us` from `HasCorporateInformationPages` A regular migration is used here to ensure that the data is updated at the same time as the enum changing, and to allow the change to be made automatically during the deployment process
- Loading branch information
Showing
10 changed files
with
61 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
db/migrate/20240530154757_rename_all_organisation_about_us_pages_bulk_content_type.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class RenameAllOrganisationAboutUsPagesBulkContentType < ActiveRecord::Migration[7.1] | ||
def up | ||
RepublishingEvent | ||
.where(bulk_content_type: :all_organisation_about_us_pages) | ||
.update_all( | ||
bulk_content_type: :all_published_organisation_about_us_pages, | ||
action: "All published organisation 'About us' pages have been queued for republishing", | ||
) | ||
end | ||
|
||
def down | ||
RepublishingEvent | ||
.where(bulk_content_type: :all_published_organisation_about_us_pages) | ||
.update_all( | ||
bulk_content_type: :all_organisation_about_us_pages, | ||
action: "All published organisation 'About Us' pages have been queued for republishing", | ||
) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters