diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-20 13:17:48 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-20 13:30:36 +0200 |
commit | e389507650769304bd61f7a82431cc6c07feb364 (patch) | |
tree | fb63f427197f8f0a6234569d2b82d71ecce9ee8f /db | |
parent | 470661e1a70bd3c8415387e9068823536d1fb1bc (diff) | |
download | gitlab-ce-e389507650769304bd61f7a82431cc6c07feb364.tar.gz |
Add optimistic locking column to ci_stages table
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170720111708_add_lock_version_to_ci_stages.rb | 9 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/db/migrate/20170720111708_add_lock_version_to_ci_stages.rb b/db/migrate/20170720111708_add_lock_version_to_ci_stages.rb new file mode 100644 index 00000000000..e1c4f033286 --- /dev/null +++ b/db/migrate/20170720111708_add_lock_version_to_ci_stages.rb @@ -0,0 +1,9 @@ +class AddLockVersionToCiStages < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + add_column :ci_stages, :lock_version, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index 862b2e21f4d..567ba4d061b 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: 20170717150329) do +ActiveRecord::Schema.define(version: 20170720111708) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -366,6 +366,7 @@ ActiveRecord::Schema.define(version: 20170717150329) do t.datetime "updated_at" t.string "name" t.integer "status" + t.integer "lock_version" end add_index "ci_stages", ["pipeline_id", "name"], name: "index_ci_stages_on_pipeline_id_and_name", using: :btree |