summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20210518002820_create_hearths.rb9
-rw-r--r--db/migrate/20210518214713_create_hearth_amenities.rb13
-rw-r--r--db/migrate/20210518214817_create_built_hearth_amenities.rb11
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