diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-02 16:56:49 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-02 16:56:49 +0000 |
commit | d048d9268cd12fd78a1d07fb46b5c94a2cc16961 (patch) | |
tree | ae1404def0d7e9a29e96492b6fb89ab04fa14394 /db | |
parent | 9fce7c8e02b5486e4931432cad8b07830fa65278 (diff) | |
parent | 7f22256a63b2c4e6fb1a85beb2ad5420b085247e (diff) | |
download | gitlab-ce-d048d9268cd12fd78a1d07fb46b5c94a2cc16961.tar.gz |
Merge branch 'metrics-deployment-history' into 'master'
Metrics deployment history
Closes #26914
See merge request !10649
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170327091750_add_created_at_index_to_deployments.rb | 15 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20170327091750_add_created_at_index_to_deployments.rb b/db/migrate/20170327091750_add_created_at_index_to_deployments.rb new file mode 100644 index 00000000000..fd6ed499b80 --- /dev/null +++ b/db/migrate/20170327091750_add_created_at_index_to_deployments.rb @@ -0,0 +1,15 @@ +class AddCreatedAtIndexToDeployments < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :deployments, :created_at + end + + def down + remove_concurrent_index :deployments, :created_at + end +end diff --git a/db/schema.rb b/db/schema.rb index b938657a186..be6684f3a6b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -386,6 +386,7 @@ ActiveRecord::Schema.define(version: 20170426181740) do t.string "on_stop" end + add_index "deployments", ["created_at"], name: "index_deployments_on_created_at", using: :btree add_index "deployments", ["project_id", "environment_id", "iid"], name: "index_deployments_on_project_id_and_environment_id_and_iid", using: :btree add_index "deployments", ["project_id", "iid"], name: "index_deployments_on_project_id_and_iid", unique: true, using: :btree |