diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-06 06:08:00 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-06 06:08:00 +0000 |
commit | 6367f9bd9cca41c932997c94a338556ded4ced8f (patch) | |
tree | f0caeeaa3d76459589c7fb0de74b3cd2883daf96 /db | |
parent | 66089ccf1ab842eb5f7608502eaf8d2642e350b5 (diff) | |
download | gitlab-ce-6367f9bd9cca41c932997c94a338556ded4ced8f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20230302163339_add_index_to_oauth_access_grants_application_id.rb | 15 | ||||
-rw-r--r-- | db/schema_migrations/20230302163339 | 1 | ||||
-rw-r--r-- | db/structure.sql | 2 |
3 files changed, 18 insertions, 0 deletions
diff --git a/db/post_migrate/20230302163339_add_index_to_oauth_access_grants_application_id.rb b/db/post_migrate/20230302163339_add_index_to_oauth_access_grants_application_id.rb new file mode 100644 index 00000000000..0db6190e17d --- /dev/null +++ b/db/post_migrate/20230302163339_add_index_to_oauth_access_grants_application_id.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddIndexToOauthAccessGrantsApplicationId < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + INDEX_NAME = 'index_oauth_access_grants_on_application_id' + + def up + add_concurrent_index :oauth_access_grants, :application_id, name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :oauth_access_grants, name: INDEX_NAME + end +end diff --git a/db/schema_migrations/20230302163339 b/db/schema_migrations/20230302163339 new file mode 100644 index 00000000000..25c611e57a6 --- /dev/null +++ b/db/schema_migrations/20230302163339 @@ -0,0 +1 @@ +5cb36884c6422f9cf2db27c7922a8835b1db6d15e629066ca825c93df7437afa
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 0055e2b3d8e..fdfe26e709b 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -31033,6 +31033,8 @@ CREATE INDEX index_ns_root_stor_stats_on_registry_size_estimated ON namespace_ro CREATE UNIQUE INDEX index_ns_user_callouts_feature ON user_namespace_callouts USING btree (user_id, feature_name, namespace_id); +CREATE INDEX index_oauth_access_grants_on_application_id ON oauth_access_grants USING btree (application_id); + CREATE INDEX index_oauth_access_grants_on_resource_owner_id ON oauth_access_grants USING btree (resource_owner_id, application_id, created_at); CREATE UNIQUE INDEX index_oauth_access_grants_on_token ON oauth_access_grants USING btree (token); |