mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-23 16:44:04 -05:00
173953c23e
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
22 lines
470 B
Ruby
22 lines
470 B
Ruby
# frozen_string_literal: true
|
|
|
|
class FixCanadianFrenchLocale < ActiveRecord::Migration[7.0]
|
|
class User < ApplicationRecord
|
|
# Dummy class, to make migration possible across version changes
|
|
end
|
|
|
|
disable_ddl_transaction!
|
|
|
|
def up
|
|
User.where(locale: 'fr-QC').in_batches do |users|
|
|
users.update_all(locale: 'fr-CA')
|
|
end
|
|
end
|
|
|
|
def down
|
|
User.where(locale: 'fr-CA').in_batches do |users|
|
|
users.update_all(locale: 'fr-QC')
|
|
end
|
|
end
|
|
end
|