gitlab-org--gitlab-foss/db/migrate/20190715042813_add_issue_id_to_versions.rb

15 lines
397 B
Ruby

# frozen_string_literal: true
class AddIssueIdToVersions < ActiveRecord::Migration[5.2]
DOWNTIME = false
def up
# rubocop:disable Migration/AddReference
add_reference :design_management_versions, :issue, index: true, foreign_key: { on_delete: :cascade }
# rubocop:enable Migration/AddReference
end
def down
remove_reference :design_management_versions, :issue
end
end