Add optional OAuth application to reports (#30539)
This commit is contained in:
parent
fa54b61216
commit
aa88aca0ad
11 changed files with 47 additions and 3 deletions
8
db/migrate/20240713171841_add_application_to_reports.rb
Normal file
8
db/migrate/20240713171841_add_application_to_reports.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddApplicationToReports < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
add_column :reports, :application_id, :bigint, null: true
|
||||
add_foreign_key :reports, :oauth_applications, column: :application_id, on_delete: :nullify, validate: false
|
||||
end
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ValidateAddApplicationToReports < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
validate_foreign_key :reports, :oauth_applications
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue