gitlab-org--gitlab-foss/db/migrate/20201204111600_create_packages_debian_publications.rb

19 lines
560 B
Ruby

# frozen_string_literal: true
class CreatePackagesDebianPublications < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def change
create_table :packages_debian_publications do |t|
t.references :package,
index: { unique: true },
null: false,
foreign_key: { to_table: :packages_packages, on_delete: :cascade }
t.references :distribution,
null: false,
foreign_key: { to_table: :packages_debian_project_distributions, on_delete: :cascade }
end
end
end