gitlab-org--gitlab-foss/db/migrate/20190731084415_add_build_need.rb
Kamil Trzciński e7ee84aad4 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.
2019-08-01 14:26:49 +00:00

20 lines
554 B
Ruby

# 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