debian-mirror-gitlab/db/migrate/20190724112147_add_column_for_self_monitoring_project_id.rb

17 lines
484 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
class AddColumnForSelfMonitoringProjectId < ActiveRecord::Migration[5.2]
DOWNTIME = false
def change
2019-12-04 20:38:33 +05:30
# rubocop:disable Migration/AddReference
2019-10-12 21:52:04 +05:30
add_reference(
:application_settings,
:instance_administration_project,
index: { name: 'index_applicationsettings_on_instance_administration_project_id' },
foreign_key: { to_table: :projects, on_delete: :nullify }
)
2019-12-04 20:38:33 +05:30
# rubocop:enable Migration/AddReference
2019-10-12 21:52:04 +05:30
end
end