Add migration to use body text value for raised texts in themes

This commit is contained in:
Andreas Nedbal 2023-01-29 20:58:19 +01:00
parent 520d77bb44
commit b5ab9d67d2
2 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,12 @@
# frozen_string_literal: true
class UseBodyTextForRaisedTextsInThemes < ActiveRecord::Migration[6.1]
def change
execute <<~SQUIRREL
UPDATE themes
SET raised_text = body_text,
raised_accent_text = body_text
WHERE body_text != 0;
SQUIRREL
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2023_01_23_214851) do
ActiveRecord::Schema.define(version: 2023_01_29_194809) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"