From 8ba568ae0ebe715b5da453681eb141886f1977a8 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Thu, 4 Sep 2025 20:55:03 +0200 Subject: Simpler, Better, Faster... Stronger Start small, address critical customer needs, /then/ scale. --- db/schema.rb | 53 ++++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) (limited to 'db/schema.rb') diff --git a/db/schema.rb b/db/schema.rb index b5f2e03..feb2fd0 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[8.0].define(version: 2025_08_24_163257) do +ActiveRecord::Schema[8.0].define(version: 2025_09_01_112954) do create_table "beds", force: :cascade do |t| t.integer "location", null: false t.datetime "created_at", null: false @@ -18,29 +18,6 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_24_163257) do t.index ["location"], name: "index_beds_on_location", unique: true end - create_table "crops", force: :cascade do |t| - t.string "name" - t.integer "crop_type", default: 1, null: false - t.float "nno3" - t.float "p" - t.float "k" - t.float "ca" - t.float "mg" - t.float "s" - t.float "na" - t.float "cl" - t.float "si" - t.float "fe" - t.float "zn" - t.float "b" - t.float "mn" - t.float "cu" - t.float "mo" - t.float "nnh4" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - create_table "fertilizer_components", force: :cascade do |t| t.string "name" t.string "formula" @@ -105,6 +82,28 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_24_163257) do t.index ["measured_on"], name: "index_nutrient_measurements_on_measured_on", unique: true end + create_table "nutrient_profiles", force: :cascade do |t| + t.string "name" + t.float "nno3" + t.float "p" + t.float "k" + t.float "ca" + t.float "mg" + t.float "s" + t.float "na" + t.float "cl" + t.float "si" + t.float "fe" + t.float "zn" + t.float "b" + t.float "mn" + t.float "cu" + t.float "mo" + t.float "nnh4" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "nutrients", force: :cascade do |t| t.string "formula" t.string "name" @@ -115,16 +114,16 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_24_163257) do create_table "rafts", force: :cascade do |t| t.integer "bed_id", null: false t.integer "location", null: false - t.integer "crop_id" + t.integer "crop_nutrient_need_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["bed_id", "location"], name: "index_rafts_on_bed_id_and_location", unique: true t.index ["bed_id"], name: "index_rafts_on_bed_id" - t.index ["crop_id"], name: "index_rafts_on_crop_id" + t.index ["crop_nutrient_need_id"], name: "index_rafts_on_crop_nutrient_need_id" end add_foreign_key "fertilizer_compositions", "fertilizer_components" add_foreign_key "fertilizer_compositions", "fertilizer_products" add_foreign_key "rafts", "beds" - add_foreign_key "rafts", "crops" + add_foreign_key "rafts", "nutrient_profiles", column: "crop_nutrient_need_id" end -- cgit v1.2.3