From 0759ca9039e5e2b108b3fcd47bda253a3bbf6180 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 4 Feb 2019 20:53:04 +1300 Subject: [PATCH] Schema update for crops added to photogaphings table --- db/schema.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/schema.rb b/db/schema.rb index 9878cdb86..d2d475824 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: 2018_04_01_220637) do +ActiveRecord::Schema.define(version: 2019_01_30_090437) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -336,6 +336,7 @@ ActiveRecord::Schema.define(version: 2018_04_01_220637) do t.string "photographable_type", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.integer "crop_id" t.index ["photographable_id", "photographable_type", "photo_id"], name: "items_to_photos_idx", unique: true t.index ["photographable_id", "photographable_type"], name: "photographable_idx" end @@ -444,6 +445,7 @@ ActiveRecord::Schema.define(version: 2018_04_01_220637) do end add_foreign_key "harvests", "plantings" + add_foreign_key "photographings", "crops" add_foreign_key "photographings", "photos" add_foreign_key "plantings", "seeds", column: "parent_seed_id", name: "parent_seed", on_delete: :nullify add_foreign_key "seeds", "plantings", column: "parent_planting_id", name: "parent_planting", on_delete: :nullify