Add the new StatType in the migration
This commit is contained in:
parent
c6a42c7c8f
commit
e9f76f2d62
1 changed files with 1 additions and 0 deletions
|
@ -3,6 +3,7 @@ class AddCostStatToCard < ActiveRecord::Migration
|
||||||
add_column :cards, :cost_stat_id, :integer
|
add_column :cards, :cost_stat_id, :integer
|
||||||
|
|
||||||
PaperTrail.whodunnit = 1
|
PaperTrail.whodunnit = 1
|
||||||
|
StatType.create(name: 'Cost', description: 'Cost')
|
||||||
Card.all.each do |c|
|
Card.all.each do |c|
|
||||||
c.cost_stat = Stat.new(stat_type_id: 4)
|
c.cost_stat = Stat.new(stat_type_id: 4)
|
||||||
c.save
|
c.save
|
||||||
|
|
Loading…
Reference in a new issue