From 14dd75d0d2131d18579f5668b1b26bf1dc91802c Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Tue, 23 May 2017 10:29:09 +0200 Subject: [PATCH] Procedure: set archive_date to datetime to allow localtime And fix /issues/1562/ sentry bug --- ...220_change_procedure_auto_archive_date_to_datetime.rb | 9 +++++++++ db/schema.rb | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20170523081220_change_procedure_auto_archive_date_to_datetime.rb diff --git a/db/migrate/20170523081220_change_procedure_auto_archive_date_to_datetime.rb b/db/migrate/20170523081220_change_procedure_auto_archive_date_to_datetime.rb new file mode 100644 index 000000000..b0d8deef3 --- /dev/null +++ b/db/migrate/20170523081220_change_procedure_auto_archive_date_to_datetime.rb @@ -0,0 +1,9 @@ +class ChangeProcedureAutoArchiveDateToDatetime < ActiveRecord::Migration[5.0] + def up + change_column :procedures, :auto_archive_on, :datetime + end + + def down + change_column :procedures, :auto_archive_on, :date + end +end diff --git a/db/schema.rb b/db/schema.rb index 140dccaf6..4af90d2e2 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.define(version: 20170414095411) do +ActiveRecord::Schema.define(version: 20170523081220) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -344,7 +344,7 @@ ActiveRecord::Schema.define(version: 20170414095411) do t.string "lien_notice" t.boolean "for_individual", default: false t.boolean "individual_with_siret", default: false - t.date "auto_archive_on" + t.datetime "auto_archive_on" end create_table "quartier_prioritaires", force: :cascade do |t|