The code powering m.abunchtell.com https://m.abunchtell.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

12 lines
254 B

  1. class UpdatePtLocales < ActiveRecord::Migration[5.2]
  2. disable_ddl_transaction!
  3. def up
  4. User.where(locale: 'pt').in_batches.update_all(locale: 'pt-PT')
  5. end
  6. def down
  7. User.where(locale: 'pt-PT').in_batches.update_all(locale: 'pt')
  8. end
  9. end