From 4a6c06eb681575dbf1ee58d3b1f667e79051b1e2 Mon Sep 17 00:00:00 2001 From: David Gay Date: Tue, 18 May 2021 18:16:04 -0400 Subject: Hearths, HearthAmenities, and BuiltHearthAmenities --- db/migrate/20210518002820_create_hearths.rb | 9 +++++++++ db/migrate/20210518214713_create_hearth_amenities.rb | 13 +++++++++++++ db/migrate/20210518214817_create_built_hearth_amenities.rb | 11 +++++++++++ 3 files changed, 33 insertions(+) create mode 100644 db/migrate/20210518002820_create_hearths.rb create mode 100644 db/migrate/20210518214713_create_hearth_amenities.rb create mode 100644 db/migrate/20210518214817_create_built_hearth_amenities.rb (limited to 'db/migrate') 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 -- cgit v1.2.3