20230524192812_fix_account_domain_casing.rb 297 B

12345678910111213
  1. # frozen_string_literal: true
  2. class FixAccountDomainCasing < ActiveRecord::Migration[6.1]
  3. disable_ddl_transaction!
  4. def up
  5. safety_assured do
  6. execute 'UPDATE accounts SET domain = lower(domain) WHERE domain IS NOT NULL AND domain != lower(domain)'
  7. end
  8. end
  9. def down; end
  10. end