diff options
author | David Gay <david@davidgay.org> | 2021-06-06 19:06:46 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-06 19:06:46 -0400 |
commit | e37402ff309311a14d7dd666d0d8b29517504017 (patch) | |
tree | 3d6604805e9004bc0c37130f451376e79a68c989 /db/migrate | |
parent | 3622126380278d9bed8ea0e1e05a0bd1ea040596 (diff) |
Leviathans
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20210606215806_create_monster_spawns.rb | 10 | ||||
-rw-r--r-- | db/migrate/20210606215818_create_monster_spawn_combats.rb | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20210606215806_create_monster_spawns.rb b/db/migrate/20210606215806_create_monster_spawns.rb new file mode 100644 index 0000000..96ccefe --- /dev/null +++ b/db/migrate/20210606215806_create_monster_spawns.rb @@ -0,0 +1,10 @@ +class CreateMonsterSpawns < ActiveRecord::Migration[6.1] + def change + create_table :monster_spawns do |t| + t.references :monster, null: false, foreign_key: true + t.references :location, null: false, foreign_key: true + + t.timestamps + end + end +end diff --git a/db/migrate/20210606215818_create_monster_spawn_combats.rb b/db/migrate/20210606215818_create_monster_spawn_combats.rb new file mode 100644 index 0000000..a2dd894 --- /dev/null +++ b/db/migrate/20210606215818_create_monster_spawn_combats.rb @@ -0,0 +1,11 @@ +class CreateMonsterSpawnCombats < ActiveRecord::Migration[6.1] + def change + create_table :monster_spawn_combats do |t| + t.references :monster_spawn, null: false, foreign_key: true + t.references :character, null: false, foreign_key: true + t.integer :hp_lost + + t.timestamps + end + end +end |