diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-06 12:09:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-06 12:09:17 +0300 |
commit | eaea945e0355826c58c3dcf887496ea91064f85c (patch) | |
tree | 0f20e03304d35e68375e99a606b9b94483e37ee5 /db/migrate | |
parent | cce8cf03d3bebe8b05375e4db0004328f84b28a2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
3 files changed, 54 insertions, 0 deletions
diff --git a/db/migrate/20200403184110_add_partial_index_on_id_to_ci_job_artifacts.rb b/db/migrate/20200403184110_add_partial_index_on_id_to_ci_job_artifacts.rb new file mode 100644 index 00000000000..f5f9f167df3 --- /dev/null +++ b/db/migrate/20200403184110_add_partial_index_on_id_to_ci_job_artifacts.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddPartialIndexOnIdToCiJobArtifacts < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_ci_job_artifacts_file_store_is_null' + + disable_ddl_transaction! + + def up + add_concurrent_index :ci_job_artifacts, :id, where: 'file_store IS NULL', name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME + end +end diff --git a/db/migrate/20200403185127_add_partial_index_on_id_to_lfs_objects.rb b/db/migrate/20200403185127_add_partial_index_on_id_to_lfs_objects.rb new file mode 100644 index 00000000000..e72bb37eb0e --- /dev/null +++ b/db/migrate/20200403185127_add_partial_index_on_id_to_lfs_objects.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddPartialIndexOnIdToLfsObjects < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_lfs_objects_file_store_is_null' + + disable_ddl_transaction! + + def up + add_concurrent_index :lfs_objects, :id, where: 'file_store IS NULL', name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :lfs_objects, INDEX_NAME + end +end diff --git a/db/migrate/20200403185422_add_partial_index_on_id_to_uploads.rb b/db/migrate/20200403185422_add_partial_index_on_id_to_uploads.rb new file mode 100644 index 00000000000..e5b532bad61 --- /dev/null +++ b/db/migrate/20200403185422_add_partial_index_on_id_to_uploads.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddPartialIndexOnIdToUploads < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_uploads_store_is_null' + + disable_ddl_transaction! + + def up + add_concurrent_index :uploads, :id, where: 'store IS NULL', name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :uploads, INDEX_NAME + end +end |