diff options
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20210522184444_create_equipment.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20210522184444_create_equipment.rb b/db/migrate/20210522184444_create_equipment.rb new file mode 100644 index 0000000..4ac9543 --- /dev/null +++ b/db/migrate/20210522184444_create_equipment.rb @@ -0,0 +1,13 @@ +class CreateEquipment < ActiveRecord::Migration[6.1] + def change + create_table :equipment do |t| + t.references :character, null: false, foreign_key: true + t.references :item, null: false, foreign_key: true + t.integer :slot + + t.timestamps + end + + remove_column :items, :equip_slot + end +end |