Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/database/async_indexes/postgres_async_index.rb')
-rw-r--r--lib/gitlab/database/async_indexes/postgres_async_index.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/gitlab/database/async_indexes/postgres_async_index.rb b/lib/gitlab/database/async_indexes/postgres_async_index.rb
index 6cb40729061..dc932482d40 100644
--- a/lib/gitlab/database/async_indexes/postgres_async_index.rb
+++ b/lib/gitlab/database/async_indexes/postgres_async_index.rb
@@ -13,6 +13,9 @@ module Gitlab
validates :table_name, presence: true, length: { maximum: MAX_IDENTIFIER_LENGTH }
validates :definition, presence: true, length: { maximum: MAX_DEFINITION_LENGTH }
+ scope :to_create, -> { where("definition ILIKE 'CREATE%'") }
+ scope :to_drop, -> { where("definition ILIKE 'DROP%'") }
+
def to_s
definition
end