Remove some data migrations
This commit is contained in:
parent
5404618b2f
commit
e1eb0d037b
2 changed files with 0 additions and 44 deletions
|
|
@ -1,25 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class MigrateLimitToBoolean < ActiveRecord::Migration[6.1]
|
||||
def up
|
||||
Weapon.all.each do |weapon|
|
||||
if weapon.limit && weapon.limit > 0
|
||||
weapon.limit2 = true
|
||||
else
|
||||
weapon.limit2 = false
|
||||
end
|
||||
end
|
||||
|
||||
Summon.all.each do |summon|
|
||||
if summon.limit && summon.limit > 0
|
||||
summon.limit2 = true
|
||||
else
|
||||
summon.limit2 = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class MigrateLimitValueToLimit2 < ActiveRecord::Migration[6.1]
|
||||
def up
|
||||
Weapon.all.each do |weapon|
|
||||
weapon.limit2 = !(weapon.limit == 0)
|
||||
weapon.save
|
||||
end
|
||||
|
||||
Summon.all.each do |summon|
|
||||
summon.limit2 = !(summon.limit == 0)
|
||||
summon.save
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
# raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue