summaryrefslogtreecommitdiff
path: root/db/migrate/20170524161101_add_protected_to_ci_variables.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-05-24 16:18:05 +0000
committerLin Jen-Shin <godfat@godfat.org>2017-05-25 06:00:18 +0800
commit96956d47ef94dd69537105dfe67e3c5e74f3a1e6 (patch)
tree54a5e1739401cdec8a40980d98700bf1962489ec /db/migrate/20170524161101_add_protected_to_ci_variables.rb
parent54fe9a1e7dadd83ddc6d6d8cc72ee851d914bc70 (diff)
downloadgitlab-ce-96956d47ef94dd69537105dfe67e3c5e74f3a1e6.tar.gz
Backend implementation for protected variables
Diffstat (limited to 'db/migrate/20170524161101_add_protected_to_ci_variables.rb')
-rw-r--r--db/migrate/20170524161101_add_protected_to_ci_variables.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20170524161101_add_protected_to_ci_variables.rb b/db/migrate/20170524161101_add_protected_to_ci_variables.rb
new file mode 100644
index 00000000000..99d4861e889
--- /dev/null
+++ b/db/migrate/20170524161101_add_protected_to_ci_variables.rb
@@ -0,0 +1,15 @@
+class AddProtectedToCiVariables < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default(:ci_variables, :protected, :boolean, default: false)
+ end
+
+ def down
+ remove_column(:ci_variables, :protected)
+ end
+end