Update grid weapon table

Add `mainhand`
Fix `belongs_to` by changing to `references`
This commit is contained in:
Justin Edmund 2020-09-16 03:26:22 -07:00
parent 7a104a50d4
commit 1fdd0017b3

View file

@ -1,13 +1,14 @@
class CreateGridWeapons < ActiveRecord::Migration[6.0]
def change
t.belongs_to :composition, type: :uuid
create_table :grid_weapons, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
t.references :party, type: :uuid
t.references :weapon, type: :uuid
t.references :weapon_key1, class_name: 'WeaponKey', type: :uuid
t.references :weapon_key2, class_name: 'WeaponKey', type: :uuid
t.integer :uncap_level
t.boolean :mainhand
t.integer :position
t.timestamps