From 2bd2a79aba43b6942578d2545608701de5b6d231 Mon Sep 17 00:00:00 2001 From: irlatrevisan Date: Thu, 27 Oct 2016 13:41:22 -0200 Subject: [PATCH] #8 <@irlatrevisan, @lrsousa> - Alterar default notification --- ...1027153705_change_notification_from_user_blood_donator.rb | 5 +++++ db/schema.rb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20161027153705_change_notification_from_user_blood_donator.rb diff --git a/db/migrate/20161027153705_change_notification_from_user_blood_donator.rb b/db/migrate/20161027153705_change_notification_from_user_blood_donator.rb new file mode 100644 index 0000000..b29f481 --- /dev/null +++ b/db/migrate/20161027153705_change_notification_from_user_blood_donator.rb @@ -0,0 +1,5 @@ +class ChangeNotificationFromUserBloodDonator < ActiveRecord::Migration[5.0] + def change + change_column_default :user_blood_donators, :notification, true + end +end diff --git a/db/schema.rb b/db/schema.rb index 88a427f..ecc6550 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: 20161027135859) do +ActiveRecord::Schema.define(version: 20161027153705) do create_table "active_admin_comments", force: :cascade do |t| t.string "namespace" @@ -110,7 +110,7 @@ t.date "date_birth" t.string "phone" t.string "cpf" - t.boolean "notification" + t.boolean "notification", default: true t.string "genre" t.string "blood_type" t.boolean "admin", default: false