summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-04-17 12:30:15 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-04-24 11:07:37 +0200
commit43dd213b8c0c1d306ace25f6d307b7e777c944cd (patch)
tree871622c3a353c07822cebc481da707e9fe69745d /db
parenta544f6ec58ba5f9cfbff6b59b50bc92bc2274bdb (diff)
downloadgitlab-ce-43dd213b8c0c1d306ace25f6d307b7e777c944cd.tar.gz
Add pipeline stage index column
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180417101940_add_index_to_ci_stage.rb9
-rw-r--r--db/schema.rb1
2 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20180417101940_add_index_to_ci_stage.rb b/db/migrate/20180417101940_add_index_to_ci_stage.rb
new file mode 100644
index 00000000000..f14bbe458ae
--- /dev/null
+++ b/db/migrate/20180417101940_add_index_to_ci_stage.rb
@@ -0,0 +1,9 @@
+class AddIndexToCiStage < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :ci_stages, :index, :integer
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index df621956c80..59f37df2da2 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -486,6 +486,7 @@ ActiveRecord::Schema.define(version: 20180418053107) do
t.string "name"
t.integer "status"
t.integer "lock_version"
+ t.integer "index"
end
add_index "ci_stages", ["pipeline_id", "name"], name: "index_ci_stages_on_pipeline_id_and_name", unique: true, using: :btree