harvested_at and harvest_predicted_at added to plantings

This commit is contained in:
Brenda Wallace
2017-10-23 14:42:51 +13:00
parent 82a37d69bc
commit 0d8ca89b14
2 changed files with 17 additions and 1 deletions

View File

@@ -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

View File

@@ -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