From d401a2cd9272c24d7a094a5f92084008423bdbdc Mon Sep 17 00:00:00 2001 From: Bertocq Date: Mon, 2 Oct 2017 21:16:22 +0200 Subject: [PATCH] Add default 0 value for Poll Recount amounts --- .../20171002191347_add_default_to_recount_amounts.rb | 7 +++++++ db/schema.rb | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20171002191347_add_default_to_recount_amounts.rb diff --git a/db/migrate/20171002191347_add_default_to_recount_amounts.rb b/db/migrate/20171002191347_add_default_to_recount_amounts.rb new file mode 100644 index 000000000..b90e86aae --- /dev/null +++ b/db/migrate/20171002191347_add_default_to_recount_amounts.rb @@ -0,0 +1,7 @@ +class AddDefaultToRecountAmounts < ActiveRecord::Migration + def change + change_column_default :poll_recounts, :white_amount, 0 + change_column_default :poll_recounts, :null_amount, 0 + change_column_default :poll_recounts, :total_amount, 0 + end +end diff --git a/db/schema.rb b/db/schema.rb index e859a487f..ebcdfe5dc 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: 20171002122312) do +ActiveRecord::Schema.define(version: 20171002191347) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -698,11 +698,11 @@ ActiveRecord::Schema.define(version: 20171002122312) do t.integer "officer_assignment_id" t.text "officer_assignment_id_log", default: "" t.text "author_id_log", default: "" - t.integer "white_amount" + t.integer "white_amount", default: 0 t.text "white_amount_log", default: "" - t.integer "null_amount" + t.integer "null_amount", default: 0 t.text "null_amount_log", default: "" - t.integer "total_amount" + t.integer "total_amount", default: 0 t.text "total_amount_log", default: "" end