Add transition id to database

parent 005c421f
class AddJiraIssueTransitionIdToServices < ActiveRecord::Migration
def up
add_column :services, :jira_issue_transition_id, :string, default: '2'
Service.reset_column_information
Service.where(jira_issue_transition_id: nil).update_all jira_issue_transition_id: '2'
end
def down
remove_column :services, :jira_issue_transition_id
end
end
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20140611135229) do ActiveRecord::Schema.define(version: 20140811155127) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
...@@ -285,6 +285,7 @@ ActiveRecord::Schema.define(version: 20140611135229) do ...@@ -285,6 +285,7 @@ ActiveRecord::Schema.define(version: 20140611135229) do
t.string "username" t.string "username"
t.string "password" t.string "password"
t.string "api_version" t.string "api_version"
t.string "jira_issue_transition_id", default: "2"
end end
add_index "services", ["project_id"], name: "index_services_on_project_id", using: :btree add_index "services", ["project_id"], name: "index_services_on_project_id", using: :btree
...@@ -366,6 +367,7 @@ ActiveRecord::Schema.define(version: 20140611135229) do ...@@ -366,6 +367,7 @@ ActiveRecord::Schema.define(version: 20140611135229) do
t.string "unconfirmed_email" t.string "unconfirmed_email"
t.boolean "hide_no_ssh_key", default: false t.boolean "hide_no_ssh_key", default: false
t.string "website_url", default: "", null: false t.string "website_url", default: "", null: false
t.datetime "admin_email_unsubscribed_at"
end end
add_index "users", ["admin"], name: "index_users_on_admin", using: :btree add_index "users", ["admin"], name: "index_users_on_admin", using: :btree
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment