diff options
Diffstat (limited to 'db')
5 files changed, 72 insertions, 0 deletions
diff --git a/db/migrate/20190415030217_add_variable_type_to_ci_variables.rb b/db/migrate/20190415030217_add_variable_type_to_ci_variables.rb new file mode 100644 index 00000000000..433f510299a --- /dev/null +++ b/db/migrate/20190415030217_add_variable_type_to_ci_variables.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddVariableTypeToCiVariables < 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_variables, :variable_type, :smallint, default: ENV_VAR_VARIABLE_TYPE) + end + + def down + remove_column(:ci_variables, :variable_type) + end +end 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 diff --git a/db/migrate/20190416213615_add_variable_type_to_ci_pipeline_variables.rb b/db/migrate/20190416213615_add_variable_type_to_ci_pipeline_variables.rb new file mode 100644 index 00000000000..1010d9bd29e --- /dev/null +++ b/db/migrate/20190416213615_add_variable_type_to_ci_pipeline_variables.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddVariableTypeToCiPipelineVariables < 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_pipeline_variables, :variable_type, :smallint, default: ENV_VAR_VARIABLE_TYPE) + end + + def down + remove_column(:ci_pipeline_variables, :variable_type) + end +end diff --git a/db/migrate/20190416213631_add_variable_type_to_ci_pipeline_schedule_variables.rb b/db/migrate/20190416213631_add_variable_type_to_ci_pipeline_schedule_variables.rb new file mode 100644 index 00000000000..3079b2afd9c --- /dev/null +++ b/db/migrate/20190416213631_add_variable_type_to_ci_pipeline_schedule_variables.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddVariableTypeToCiPipelineScheduleVariables < 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_pipeline_schedule_variables, :variable_type, :smallint, default: ENV_VAR_VARIABLE_TYPE) + end + + def down + remove_column(:ci_pipeline_schedule_variables, :variable_type) + end +end diff --git a/db/schema.rb b/db/schema.rb index ef8cb4abf31..1bcd22dc81c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -419,6 +419,7 @@ ActiveRecord::Schema.define(version: 20190426180107) do t.datetime_with_timezone "created_at", null: false t.datetime_with_timezone "updated_at", null: false t.boolean "masked", default: false, null: false + t.integer "variable_type", limit: 2, default: 1, null: false t.index ["group_id", "key"], name: "index_ci_group_variables_on_group_id_and_key", unique: true, using: :btree end @@ -458,6 +459,7 @@ ActiveRecord::Schema.define(version: 20190426180107) do t.integer "pipeline_schedule_id", null: false t.datetime_with_timezone "created_at" t.datetime_with_timezone "updated_at" + t.integer "variable_type", limit: 2, default: 1, null: false t.index ["pipeline_schedule_id", "key"], name: "index_ci_pipeline_schedule_variables_on_schedule_id_and_key", unique: true, using: :btree end @@ -484,6 +486,7 @@ ActiveRecord::Schema.define(version: 20190426180107) do t.string "encrypted_value_salt" t.string "encrypted_value_iv" t.integer "pipeline_id", null: false + t.integer "variable_type", limit: 2, default: 1, null: false t.index ["pipeline_id", "key"], name: "index_ci_pipeline_variables_on_pipeline_id_and_key", unique: true, using: :btree end @@ -618,6 +621,7 @@ ActiveRecord::Schema.define(version: 20190426180107) do t.boolean "protected", default: false, null: false t.string "environment_scope", default: "*", null: false t.boolean "masked", default: false, null: false + t.integer "variable_type", limit: 2, default: 1, null: false t.index ["project_id", "key", "environment_scope"], name: "index_ci_variables_on_project_id_and_key_and_environment_scope", unique: true, using: :btree end |