summaryrefslogtreecommitdiff
path: root/db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-12-05 15:15:25 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-12-05 15:15:25 +0100
commit73f872448b59600eca792f9a34e2c8bfa976afde (patch)
treeefdb75081035ace49b0289fe562913583b36517c /db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb
parent6de0eb032e7895f26a01801bd47becace26852a0 (diff)
downloadgitlab-ce-73f872448b59600eca792f9a34e2c8bfa976afde.tar.gz
Use partial NOT NULL index for token_encrypted field
Diffstat (limited to 'db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb')
-rw-r--r--db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb b/db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb
index 198d94fa7be..f90aca008e5 100644
--- a/db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb
+++ b/db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb
@@ -8,7 +8,7 @@ class AddIndexToCiBuildsTokenEncrypted < ActiveRecord::Migration[5.0]
disable_ddl_transaction!
def up
- add_concurrent_index :ci_builds, :token_encrypted, unique: true
+ add_concurrent_index :ci_builds, :token_encrypted, unique: true, where: 'token_encrypted IS NOT NULL'
end
def down