diff --git a/db/migrate/20230129194809_use_body_text_for_raised_texts_in_themes.rb b/db/migrate/20230129194809_use_body_text_for_raised_texts_in_themes.rb new file mode 100644 index 00000000..b8b574a1 --- /dev/null +++ b/db/migrate/20230129194809_use_body_text_for_raised_texts_in_themes.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index d95c380d..82edbdda 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.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"