From 77d78b9023106cedd81703a1c6735e9109f631bb Mon Sep 17 00:00:00 2001 From: hellekin Date: Tue, 6 Oct 2020 16:17:44 +0200 Subject: Add Resource model Resources will be stored as JSON, in the (GeoJSON) :feature column. They are assigned an UUID upon creation if they don't comme with one. They belong to an Agent. --- db/schema.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'db/schema.rb') diff --git a/db/schema.rb b/db/schema.rb index ef4f4cd..8433cd9 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_10_05_155004) do +ActiveRecord::Schema.define(version: 2020_10_06_140511) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -34,6 +34,14 @@ ActiveRecord::Schema.define(version: 2020_10_05_155004) do t.index ["uuid"], name: "index_agents_on_uuid", unique: true end + create_table "resources", force: :cascade do |t| + t.uuid "uuid" + t.jsonb "feature" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["uuid"], name: "index_resources_on_uuid", unique: true + end + create_table "users", force: :cascade do |t| t.string "name" t.string "username" -- cgit v1.2.3