diff options
author | David Gay <david@davidgay.org> | 2021-05-22 15:39:16 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-22 15:39:16 -0400 |
commit | 38f3a39221869483e3468e9f4d8cab5450a70f89 (patch) | |
tree | ef831c35d61e05b46c356d39e30ecc6d6f7353b1 /db/migrate | |
parent | 88bd4f77db3a4372c118a9faef613615db66bc52 (diff) |
Equiping and unequiping items
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 |