From 1e36c1285b53be262f87a0bb2bb61c99252a4075 Mon Sep 17 00:00:00 2001 From: Nikita Kholin <nik.kholin@gmail.com> Date: Sun, 23 Jul 2017 15:01:11 +0300 Subject: [PATCH] Add enabled to room activities --- .../20170723094449_add_enabled_to_room_activities.rb | 5 +++++ db/schema.rb | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20170723094449_add_enabled_to_room_activities.rb diff --git a/db/migrate/20170723094449_add_enabled_to_room_activities.rb b/db/migrate/20170723094449_add_enabled_to_room_activities.rb new file mode 100644 index 0000000..3cc3dad --- /dev/null +++ b/db/migrate/20170723094449_add_enabled_to_room_activities.rb @@ -0,0 +1,5 @@ +class AddEnabledToRoomActivities < ActiveRecord::Migration[5.0] + def change + add_column :room_activities, :enabled, :boolean, default: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 194f490..0ab065f 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: 20170720192353) do +ActiveRecord::Schema.define(version: 20170723094449) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -41,8 +41,9 @@ create_table "room_activities", force: :cascade do |t| t.string "name" t.integer "room_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.boolean "enabled", default: true t.index ["room_id"], name: "index_room_activities_on_room_id", using: :btree end