diff options
author | David Gay <david@davidgay.org> | 2021-05-18 18:16:04 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-18 18:16:04 -0400 |
commit | 4a6c06eb681575dbf1ee58d3b1f667e79051b1e2 (patch) | |
tree | 194a555305ec8c12271160a2c7ccf3087f16cd41 /db/migrate | |
parent | 25c499ae942086b460b886e3d79dc5a55e5f1214 (diff) |
Hearths, HearthAmenities, and BuiltHearthAmenities
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20210518002820_create_hearths.rb | 9 | ||||
-rw-r--r-- | db/migrate/20210518214713_create_hearth_amenities.rb | 13 | ||||
-rw-r--r-- | db/migrate/20210518214817_create_built_hearth_amenities.rb | 11 |
3 files changed, 33 insertions, 0 deletions
diff --git a/db/migrate/20210518002820_create_hearths.rb b/db/migrate/20210518002820_create_hearths.rb new file mode 100644 index 0000000..051a2e7 --- /dev/null +++ b/db/migrate/20210518002820_create_hearths.rb @@ -0,0 +1,9 @@ +class CreateHearths < ActiveRecord::Migration[6.1] + def change + create_table :hearths do |t| + t.references :character, null: false, foreign_key: true + + t.timestamps + end + end +end diff --git a/db/migrate/20210518214713_create_hearth_amenities.rb b/db/migrate/20210518214713_create_hearth_amenities.rb new file mode 100644 index 0000000..dbbea6d --- /dev/null +++ b/db/migrate/20210518214713_create_hearth_amenities.rb @@ -0,0 +1,13 @@ +class CreateHearthAmenities < ActiveRecord::Migration[6.1] + def change + create_table :hearth_amenities do |t| + t.string :gid + t.string :name + t.text :description + t.jsonb :build_data + + t.timestamps + end + add_index :hearth_amenities, :gid + end +end diff --git a/db/migrate/20210518214817_create_built_hearth_amenities.rb b/db/migrate/20210518214817_create_built_hearth_amenities.rb new file mode 100644 index 0000000..d9c1c5d --- /dev/null +++ b/db/migrate/20210518214817_create_built_hearth_amenities.rb @@ -0,0 +1,11 @@ +class CreateBuiltHearthAmenities < ActiveRecord::Migration[6.1] + def change + create_table :built_hearth_amenities do |t| + t.references :hearth, null: false, foreign_key: true + t.references :hearth_amenity, null: false, foreign_key: true + t.integer :level + + t.timestamps + end + end +end |