diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2019-08-01 17:26:49 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-08-01 17:26:49 +0300 |
commit | e7ee84aad4237eaa16f2aba75b4d2c7860625c9d (patch) | |
tree | 786c239cdf6568289f9b2df4dd1d85290c246b36 /db/migrate/20190731084415_add_build_need.rb | |
parent | 2cf9769d12bb93c7a55432f8c8c08e89e6735461 (diff) |
Add support for DAG
This implements the support for `needs:` keyword
as part of GitLab CI. That makes some of the jobs
to be run out of order.
Diffstat (limited to 'db/migrate/20190731084415_add_build_need.rb')
-rw-r--r-- | db/migrate/20190731084415_add_build_need.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20190731084415_add_build_need.rb b/db/migrate/20190731084415_add_build_need.rb new file mode 100644 index 00000000000..45b8abb480d --- /dev/null +++ b/db/migrate/20190731084415_add_build_need.rb @@ -0,0 +1,20 @@ +# 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 AddBuildNeed < ActiveRecord::Migration[5.2] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + create_table :ci_build_needs, id: :serial do |t| + t.integer :build_id, null: false + t.text :name, null: false + + t.index [:build_id, :name], unique: true + t.foreign_key :ci_builds, column: :build_id, on_delete: :cascade + end + end +end |