diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-02-20 15:37:49 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-02-27 17:12:04 +0900 |
commit | 314062fec5a1d1f56a63202fa16fc7dacc876083 (patch) | |
tree | 1eccb736a2de4274ece3f9acc1c74efe9033ff8c /db | |
parent | aa77c5bd342a625c99eba8d0c1fb625b6811d412 (diff) | |
download | gitlab-ce-314062fec5a1d1f56a63202fa16fc7dacc876083.tar.gz |
Persist source sha and target sha for merge pipelines
source_sha and target_sha are used for merge request pipelines
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20190220150130_add_extra_shas_to_ci_pipelines.rb | 12 | ||||
-rw-r--r-- | db/schema.rb | 4 |
2 files changed, 15 insertions, 1 deletions
diff --git a/db/migrate/20190220150130_add_extra_shas_to_ci_pipelines.rb b/db/migrate/20190220150130_add_extra_shas_to_ci_pipelines.rb new file mode 100644 index 00000000000..45c7c0949c6 --- /dev/null +++ b/db/migrate/20190220150130_add_extra_shas_to_ci_pipelines.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class AddExtraShasToCiPipelines < ActiveRecord::Migration[5.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + add_column :ci_pipelines, :source_sha, :binary + add_column :ci_pipelines, :target_sha, :binary + end +end diff --git a/db/schema.rb b/db/schema.rb index 1bdc9682cc9..d835e48938d 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: 20190204115450) do +ActiveRecord::Schema.define(version: 20190220150130) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -497,6 +497,8 @@ ActiveRecord::Schema.define(version: 20190204115450) do t.integer "failure_reason" t.integer "iid" t.integer "merge_request_id" + t.binary "source_sha" + t.binary "target_sha" t.index ["auto_canceled_by_id"], name: "index_ci_pipelines_on_auto_canceled_by_id", using: :btree t.index ["merge_request_id"], name: "index_ci_pipelines_on_merge_request_id", where: "(merge_request_id IS NOT NULL)", using: :btree t.index ["pipeline_schedule_id"], name: "index_ci_pipelines_on_pipeline_schedule_id", using: :btree |