diff options
author | David Gay <david@davidgay.org> | 2021-05-29 17:19:56 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-29 17:19:56 -0400 |
commit | aac7563767c5fbc5ef67f4d615833e7523a46df7 (patch) | |
tree | 807e708c32d6d8710bcc1b6f96862ed34b320072 /db/migrate | |
parent | 8f9dcbf33d5cd3222e4d8e0cfa6f72b1596b917c (diff) |
Conditions and states (boons & banes), with `quarrying_draught`
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 |