diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-19 07:26:47 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-19 07:26:47 -0500 |
commit | 66286178adabb4565409ff170794062a3ba31d4f (patch) | |
tree | fc74d4aa2b983b02b8b92a7758137d40bd3df70b /db | |
parent | 40debd9f80f363c06e03b8c67c076a1060016aab (diff) |
migrate the kobolds from user setting to account
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20190719121326_migrate_user_kobolds_to_account.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20190719121326_migrate_user_kobolds_to_account.rb b/db/migrate/20190719121326_migrate_user_kobolds_to_account.rb new file mode 100644 index 000000000..5413aaaab --- /dev/null +++ b/db/migrate/20190719121326_migrate_user_kobolds_to_account.rb @@ -0,0 +1,10 @@ +class MigrateUserKoboldsToAccount < ActiveRecord::Migration[5.2] + disable_ddl_transaction! + def up + Account.local.find_each do |account| + account.kobold = a.user_is_a_kobold? || false + account.gently = a.user_gentlies_kobolds? || false + account.save + end + end +end |