summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-09-10 13:05:22 +0100
committerNick Thomas <nick@gitlab.com>2018-10-01 15:33:36 +0100
commitfb48eaba4600c1e0e36afae6ec7638d52265a62c (patch)
treecc4d0c6799d7dd4a45aa55b8f0a59ccd3ef37753 /db/migrate
parent1b7fd53ae37bb7836e7fd3be80077717d1b3cd4d (diff)
downloadgitlab-ce-fb48eaba4600c1e0e36afae6ec7638d52265a62c.tar.gz
Encrypt webhook tokens and URLs in the database
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20180910115836_add_attr_encrypted_columns_to_web_hook.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20180910115836_add_attr_encrypted_columns_to_web_hook.rb b/db/migrate/20180910115836_add_attr_encrypted_columns_to_web_hook.rb
new file mode 100644
index 00000000000..72f5c8d653b
--- /dev/null
+++ b/db/migrate/20180910115836_add_attr_encrypted_columns_to_web_hook.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddAttrEncryptedColumnsToWebHook < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :web_hooks, :encrypted_token, :string
+ add_column :web_hooks, :encrypted_token_iv, :string
+
+ add_column :web_hooks, :encrypted_url, :string
+ add_column :web_hooks, :encrypted_url_iv, :string
+ end
+end