summaryrefslogtreecommitdiff
path: root/db/migrate/20260626222953_remove_root_locale_from_page_translations.rb
blob: 51fcfbc12234a428c25b4b7d74ead2cccf849ef9 (plain)
1
2
3
4
5
6
7
8
9
10
class RemoveRootLocaleFromPageTranslations < ActiveRecord::Migration[7.2]
  def up
    count = execute("DELETE FROM page_translations WHERE locale = 'root'").cmd_tuples
    say "Deleted #{count} root locale records from page_translations"
  end

  def down
    raise ActiveRecord::IrreversibleMigration
  end
end