debian-mirror-gitlab/db/migrate/20190715042813_add_issue_id_to_versions.rb

16 lines
397 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
class AddIssueIdToVersions < ActiveRecord::Migration[5.2]
DOWNTIME = false
def up
2019-12-04 20:38:33 +05:30
# rubocop:disable Migration/AddReference
2019-10-12 21:52:04 +05:30
add_reference :design_management_versions, :issue, index: true, foreign_key: { on_delete: :cascade }
2019-12-04 20:38:33 +05:30
# rubocop:enable Migration/AddReference
2019-10-12 21:52:04 +05:30
end
def down
remove_reference :design_management_versions, :issue
end
end