From 0d8ca89b14bc27e3fb94241ef5ae339a8935bb7d Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 23 Oct 2017 14:42:51 +1300 Subject: [PATCH] harvested_at and harvest_predicted_at added to plantings --- db/migrate/20171022032108_all_the_predictions.rb | 14 ++++++++++++++ db/schema.rb | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20171022032108_all_the_predictions.rb diff --git a/db/migrate/20171022032108_all_the_predictions.rb b/db/migrate/20171022032108_all_the_predictions.rb new file mode 100644 index 000000000..12f0372c0 --- /dev/null +++ b/db/migrate/20171022032108_all_the_predictions.rb @@ -0,0 +1,14 @@ +class AllThePredictions < ActiveRecord::Migration + def change + # add_column :crops, :perennial, :boolean, default: false + # add_column :crops, :median_time_to_first_harvest, :interval + # add_column :crops, :median_time_to_last_harvest, :interval + # add_column :crops, :median_time_to_finished, :interval + + add_column :plantings, :harvest_predicted_at, :datetime + add_column :plantings, :harvested_at, :datetime + # add_column :plantings, :failed_at, :datetime + + # add_column :plantings, :finish_predicted_at, :datetime + end +end diff --git a/db/schema.rb b/db/schema.rb index 601d38e7f..699b89d7d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170520060252) do +ActiveRecord::Schema.define(version: 20171022032108) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -423,6 +423,8 @@ ActiveRecord::Schema.define(version: 20170520060252) do t.boolean "finished", default: false t.date "finished_at" t.integer "days_before_maturity" + t.datetime "harvest_predicted_at" + t.datetime "harvested_at" end add_index "plantings", ["slug"], name: "index_plantings_on_slug", unique: true, using: :btree