diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-11-29 11:54:35 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-12-05 10:53:48 +0100 |
commit | 03f4ad4323bed8bc04ad3d93a50e187e6677281e (patch) | |
tree | ad98b6699a8871f11885c7fd4fe48e1c02fb50b0 /db/migrate | |
parent | 14db2a42149cc1680762cf6df443677d76dca9ee (diff) | |
download | gitlab-ce-03f4ad4323bed8bc04ad3d93a50e187e6677281e.tar.gz |
Add encrypted token field to ci_builds table
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20181129104854_add_token_encrypted_to_ci_builds.rb | 11 | ||||
-rw-r--r-- | db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb | 17 |
2 files changed, 28 insertions, 0 deletions
diff --git a/db/migrate/20181129104854_add_token_encrypted_to_ci_builds.rb b/db/migrate/20181129104854_add_token_encrypted_to_ci_builds.rb new file mode 100644 index 00000000000..11b98203793 --- /dev/null +++ b/db/migrate/20181129104854_add_token_encrypted_to_ci_builds.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class AddTokenEncryptedToCiBuilds < ActiveRecord::Migration[5.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + add_column :ci_builds, :token_encrypted, :string + end +end 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 new file mode 100644 index 00000000000..198d94fa7be --- /dev/null +++ b/db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIndexToCiBuildsTokenEncrypted < ActiveRecord::Migration[5.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :ci_builds, :token_encrypted, unique: true + end + + def down + remove_concurrent_index :ci_builds, :token_encrypted + end +end |