diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-18 09:12:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-18 09:12:31 +0300 |
commit | 20ab32fe1094c9781e5b39381412898b6dce6657 (patch) | |
tree | f1a7c72875cf1bec79dcdf0b0fdeaee9490a0e87 /db | |
parent | cd54eae89b35e0ba1d798cbe5850762c25e16132 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20230414075119_add_namespaces_by_top_level_namespace_index.rb | 15 | ||||
-rw-r--r-- | db/schema_migrations/20230414075119 | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/db/post_migrate/20230414075119_add_namespaces_by_top_level_namespace_index.rb b/db/post_migrate/20230414075119_add_namespaces_by_top_level_namespace_index.rb new file mode 100644 index 00000000000..2cc433de605 --- /dev/null +++ b/db/post_migrate/20230414075119_add_namespaces_by_top_level_namespace_index.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddNamespacesByTopLevelNamespaceIndex < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + INDEX_NAME = 'index_on_namespaces_namespaces_by_top_level_namespace' + + def up + prepare_async_index :namespaces, '((traversal_ids[1]), type, id)', name: INDEX_NAME + end + + def down + unprepare_async_index_by_name :ci_builds, INDEX_NAME + end +end diff --git a/db/schema_migrations/20230414075119 b/db/schema_migrations/20230414075119 new file mode 100644 index 00000000000..9c062a74af0 --- /dev/null +++ b/db/schema_migrations/20230414075119 @@ -0,0 +1 @@ +be2246a2d36d87793007f1a0cf3eddface8de605eee40a93ba3985d26e6b924b
\ No newline at end of file |