Update parties table

Remove `characters`, `weapons` and `summons`
Rename `hash` to `shortcode`
Fix `belongs_to` by changing to `references`
This commit is contained in:
Justin Edmund 2020-09-16 03:23:27 -07:00
parent dd0a2d5844
commit 7a104a50d4

View file

@ -1,13 +1,9 @@
class CreateParties < ActiveRecord::Migration[6.0]
def change
t.belongs_to :user, type: :uuid
create_table :parties, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
t.references :user, type: :uuid
t.string :hash
t.string :characters, array: true, default: []
t.string :weapons, array: true, default: []
t.string :summons, array: true, default: []
t.string :shortcode
t.timestamps
end