debian-mirror-gitlab/db/migrate/20191108031900_create_package_build_info.rb
2020-01-01 13:55:28 +05:30

12 lines
471 B
Ruby

# frozen_string_literal: true
class CreatePackageBuildInfo < ActiveRecord::Migration[5.2]
DOWNTIME = false
def change
create_table :packages_build_infos do |t|
t.references :package, null: false, foreign_key: { to_table: :packages_packages, on_delete: :cascade }, type: :integer, index: { unique: true }
t.references :pipeline, index: true, null: true, foreign_key: { to_table: :ci_pipelines, on_delete: :nullify }, type: :integer
end
end
end