diff options
author | Simon Knox <psimyn@gmail.com> | 2019-08-06 15:07:18 +1000 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2019-08-06 15:07:18 +1000 |
commit | fc77b9df8b6a49c86e9c1eb949f1b1162470d2ee (patch) | |
tree | 96aad0a31543fa520626dc1c5efabff1367a0bab /db/migrate/20190711124721_create_job_variables.rb | |
parent | 9c71bf3e6df2dcb20ea19df21a127823bbe5e615 (diff) | |
parent | fa216b0e86433192ba4e39a05f42217fb4685173 (diff) | |
download | gitlab-ce-alerts-dropdown-to-modal-part-2-ce.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into alerts-dropdown-to-modal-part-2-cealerts-dropdown-to-modal-part-2-ce
Diffstat (limited to 'db/migrate/20190711124721_create_job_variables.rb')
-rw-r--r-- | db/migrate/20190711124721_create_job_variables.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/db/migrate/20190711124721_create_job_variables.rb b/db/migrate/20190711124721_create_job_variables.rb new file mode 100644 index 00000000000..a860522f39e --- /dev/null +++ b/db/migrate/20190711124721_create_job_variables.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class CreateJobVariables < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def change + create_table :ci_job_variables do |t| + t.string :key, null: false + t.text :encrypted_value + t.string :encrypted_value_iv + t.references :job, null: false, index: true, foreign_key: { to_table: :ci_builds, on_delete: :cascade } + t.integer :variable_type, null: false, limit: 2, default: 1 + end + + add_index :ci_job_variables, [:key, :job_id], unique: true + end +end |