summaryrefslogtreecommitdiff
path: root/db/migrate/20190416213556_add_variable_type_to_ci_group_variables.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20190416213556_add_variable_type_to_ci_group_variables.rb')
-rw-r--r--db/migrate/20190416213556_add_variable_type_to_ci_group_variables.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20190416213556_add_variable_type_to_ci_group_variables.rb b/db/migrate/20190416213556_add_variable_type_to_ci_group_variables.rb
new file mode 100644
index 00000000000..dce73caeb5e
--- /dev/null
+++ b/db/migrate/20190416213556_add_variable_type_to_ci_group_variables.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddVariableTypeToCiGroupVariables < ActiveRecord::Migration[5.0]
+ include Gitlab::Database::MigrationHelpers
+ disable_ddl_transaction!
+
+ DOWNTIME = false
+ ENV_VAR_VARIABLE_TYPE = 1
+
+ def up
+ add_column_with_default(:ci_group_variables, :variable_type, :smallint, default: ENV_VAR_VARIABLE_TYPE)
+ end
+
+ def down
+ remove_column(:ci_group_variables, :variable_type)
+ end
+end