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