diff options
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20210529195709_create_conditions.rb | 12 | ||||
-rw-r--r-- | db/migrate/20210529195809_create_states.rb | 11 |
2 files changed, 23 insertions, 0 deletions
diff --git a/db/migrate/20210529195709_create_conditions.rb b/db/migrate/20210529195709_create_conditions.rb new file mode 100644 index 0000000..8330fcb --- /dev/null +++ b/db/migrate/20210529195709_create_conditions.rb @@ -0,0 +1,12 @@ +class CreateConditions < ActiveRecord::Migration[6.1] + def change + create_table :conditions do |t| + t.string :gid + t.string :name + t.text :description + t.jsonb :whatnot + + t.timestamps + end + end +end diff --git a/db/migrate/20210529195809_create_states.rb b/db/migrate/20210529195809_create_states.rb new file mode 100644 index 0000000..6922e0a --- /dev/null +++ b/db/migrate/20210529195809_create_states.rb @@ -0,0 +1,11 @@ +class CreateStates < ActiveRecord::Migration[6.1] + def change + create_table :states do |t| + t.references :character, null: false, foreign_key: true + t.references :condition, null: false, foreign_key: true + t.timestamp :expires_at + + t.timestamps + end + end +end |