diff options
| author | Ash McKenzie <amckenzie@gitlab.com> | 2018-04-18 15:52:31 +1000 |
|---|---|---|
| committer | Ash McKenzie <amckenzie@gitlab.com> | 2018-04-19 10:28:51 +1000 |
| commit | 0ac5f1279ef45279a06a744e97955143f9b96ee8 (patch) | |
| tree | 5dfc6f7452e2726b5e128992394c71efd81dc652 /db/migrate | |
| parent | adcdb25b014fe849fe8003a954484a695fbf78ed (diff) | |
| download | gitlab-ce-0ac5f1279ef45279a06a744e97955143f9b96ee8.tar.gz | |
Add index to file_store on ci_job_artifacts
Diffstat (limited to 'db/migrate')
| -rw-r--r-- | db/migrate/20180418053107_add_index_to_ci_job_artifacts_file_store.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20180418053107_add_index_to_ci_job_artifacts_file_store.rb b/db/migrate/20180418053107_add_index_to_ci_job_artifacts_file_store.rb new file mode 100644 index 00000000000..1084ca14a34 --- /dev/null +++ b/db/migrate/20180418053107_add_index_to_ci_job_artifacts_file_store.rb @@ -0,0 +1,15 @@ +class AddIndexToCiJobArtifactsFileStore < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :ci_job_artifacts, :file_store + end + + def down + remove_index :ci_job_artifacts, :file_store if index_exists?(:ci_job_artifacts, :file_store) + end +end |
