From 55153660647741af22be2278d292de8a54bc0402 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Wed, 11 Feb 2015 09:24:40 -0800 Subject: [PATCH] Add template boolean to services. --- app/models/service.rb | 2 +- db/migrate/20150211172122_add_template_to_service.rb | 5 +++++ db/schema.rb | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20150211172122_add_template_to_service.rb diff --git a/app/models/service.rb b/app/models/service.rb index caabe8e971d..4a0f8dacecf 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -10,7 +10,7 @@ # updated_at :datetime # active :boolean default(FALSE), not null # properties :text -# +# tempalate :boolean default(FALSE) # To add new service you should build a class inherited from Service # and implement a set of methods diff --git a/db/migrate/20150211172122_add_template_to_service.rb b/db/migrate/20150211172122_add_template_to_service.rb new file mode 100644 index 00000000000..b1bfbc45ee9 --- /dev/null +++ b/db/migrate/20150211172122_add_template_to_service.rb @@ -0,0 +1,5 @@ +class AddTemplateToService < ActiveRecord::Migration + def change + add_column :services, :template, :boolean, default: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 8b6142a80a0..d9f954d5c6c 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: 20150209222013) do +ActiveRecord::Schema.define(version: 20150211172122) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -365,6 +365,7 @@ ActiveRecord::Schema.define(version: 20150209222013) do t.datetime "updated_at" t.boolean "active", default: false, null: false t.text "properties" + t.boolean "template", default: false end add_index "services", ["created_at", "id"], name: "index_services_on_created_at_and_id", using: :btree