summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20210503221405_create_locations.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20210503221405_create_locations.rb b/db/migrate/20210503221405_create_locations.rb
new file mode 100644
index 0000000..83bd143
--- /dev/null
+++ b/db/migrate/20210503221405_create_locations.rb
@@ -0,0 +1,15 @@
+class CreateLocations < ActiveRecord::Migration[6.1]
+ def change
+ create_table :locations do |t|
+ t.string :gid
+ t.string :name
+ t.text :description
+ t.jsonb :whatnot
+
+ t.timestamps
+ end
+
+ add_index :locations, :gid
+ add_reference :activities, :location
+ end
+end