Skip to content
Snippets Groups Projects
Commit 38e4cc8d authored by Zakir Dzhamaliddinov's avatar Zakir Dzhamaliddinov :computer:
Browse files

Review fixes - add indexes for JiHu version

parent 2075a47c
No related branches found
No related tags found
No related merge requests found
Pipeline #1310646186 failed
Pipeline: GitLab Community Fork

#1310668158

    Pipeline: rspec:predictive

    #1310668157

      ......@@ -8,7 +8,7 @@ class AddTrigramIndexOnPublicEmailForUsers < Gitlab::Database::Migration[2.2]
      INDEX_NAME = 'index_users_on_public_email_trigram'
      def up
      return if Gitlab.com?
      return if Gitlab.com_except_jh?
      # rubocop:disable Migration/PreventIndexCreation -- index for self-managed instance
      add_concurrent_index :users, :public_email, name: INDEX_NAME, using: :gin, opclass: { public_email: :gin_trgm_ops }
      ......@@ -16,7 +16,7 @@ def up
      end
      def down
      return if Gitlab.com?
      return if Gitlab.com_except_jh?
      remove_concurrent_index_by_name :users, INDEX_NAME
      end
      ......
      ......@@ -8,7 +8,7 @@ class AddTrigramIndexOnEmailForUsers < Gitlab::Database::Migration[2.2]
      INDEX_NAME = 'index_users_on_email_trigram'
      def up
      return if Gitlab.com?
      return if Gitlab.com_except_jh?
      # rubocop:disable Migration/PreventIndexCreation -- index for self-managed instance
      add_concurrent_index :users, :email, name: INDEX_NAME, using: :gin, opclass: { email: :gin_trgm_ops }
      ......@@ -16,7 +16,7 @@ def up
      end
      def down
      return if Gitlab.com?
      return if Gitlab.com_except_jh?
      remove_concurrent_index_by_name :users, INDEX_NAME
      end
      ......
      ......@@ -8,13 +8,13 @@ class AddTrigramIndexOnEmailForEmails < Gitlab::Database::Migration[2.2]
      INDEX_NAME = 'index_emails_on_email_trigram'
      def up
      return if Gitlab.com?
      return if Gitlab.com_except_jh?
      add_concurrent_index :emails, :email, name: INDEX_NAME, using: :gin, opclass: { email: :gin_trgm_ops }
      end
      def down
      return if Gitlab.com?
      return if Gitlab.com_except_jh?
      remove_concurrent_index_by_name :emails, INDEX_NAME
      end
      ......
      0% Loading or .
      You are about to add 0 people to the discussion. Proceed with caution.
      Finish editing this message first!
      Please register or to comment