diff options
author | Etienne BaquƩ <ebaque@gitlab.com> | 2019-07-11 16:41:04 -0400 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-26 19:39:48 -0700 |
commit | 3394c6532e4ef4582d806aed8c5285bf462fea3b (patch) | |
tree | 48cfdd2e654adb6542912b4b1a21ea37b076fe59 /db/migrate | |
parent | d6b420baffef4ac0ca1684d7a0fc00d20f026644 (diff) | |
download | gitlab-ce-3394c6532e4ef4582d806aed8c5285bf462fea3b.tar.gz |
Added migration to encrypt token in DeployToken records
Added migrations to make token column accepting null values and to add
encrypted token column.
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20190711200053_change_deploy_tokens_token_not_null.rb | 11 | ||||
-rw-r--r-- | db/migrate/20190711200508_add_token_encrypted_to_deploy_tokens.rb | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/db/migrate/20190711200053_change_deploy_tokens_token_not_null.rb b/db/migrate/20190711200053_change_deploy_tokens_token_not_null.rb new file mode 100644 index 00000000000..14ccf544d0b --- /dev/null +++ b/db/migrate/20190711200053_change_deploy_tokens_token_not_null.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class ChangeDeployTokensTokenNotNull < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + change_column_null :deploy_tokens, :token, true + end +end diff --git a/db/migrate/20190711200508_add_token_encrypted_to_deploy_tokens.rb b/db/migrate/20190711200508_add_token_encrypted_to_deploy_tokens.rb new file mode 100644 index 00000000000..3c352441057 --- /dev/null +++ b/db/migrate/20190711200508_add_token_encrypted_to_deploy_tokens.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class AddTokenEncryptedToDeployTokens < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + add_column :deploy_tokens, :token_encrypted, :string + end +end |