hensei-api/db/migrate/20200913092024_create_grid_weapons.rb
Justin Edmund 1fdd0017b3 Update grid weapon table
Add `mainhand`
Fix `belongs_to` by changing to `references`
2020-09-16 03:26:22 -07:00

17 lines
566 B
Ruby

class CreateGridWeapons < ActiveRecord::Migration[6.0]
def change
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
end
end
end