From 36a235db12cf1e0fbae61a5ab34e2bfddd51efca Mon Sep 17 00:00:00 2001 From: Xero Date: Tue, 5 Mar 2024 10:04:30 -0500 Subject: [PATCH] add year acquired to plants --- db/migrate/20240305043259_add_year_acquired_to_plants.rb | 5 +++++ db/schema.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20240305043259_add_year_acquired_to_plants.rb diff --git a/db/migrate/20240305043259_add_year_acquired_to_plants.rb b/db/migrate/20240305043259_add_year_acquired_to_plants.rb new file mode 100644 index 0000000..80b3586 --- /dev/null +++ b/db/migrate/20240305043259_add_year_acquired_to_plants.rb @@ -0,0 +1,5 @@ +class AddYearAcquiredToPlants < ActiveRecord::Migration[7.0] + def change + add_column :plants, :year_acquired, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index 4d0639f..73d7abf 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[7.0].define(version: 2024_03_04_165702) do +ActiveRecord::Schema[7.0].define(version: 2024_03_05_043259) do create_table "families", force: :cascade do |t| t.string "name" t.datetime "created_at", null: false @@ -32,6 +32,7 @@ t.integer "family_id" t.integer "genus_id" t.integer "status_id" + t.integer "year_acquired" t.index ["name"], name: "index_plants_on_name", unique: true end