Merge commit '9e04007020
' into upstream-20240725
This commit is contained in:
commit
a99f174d98
322 changed files with 8093 additions and 1586 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
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.1].define(version: 2024_07_12_064044) do
|
||||
ActiveRecord::Schema[7.1].define(version: 2024_07_13_171909) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
|
@ -1229,6 +1229,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_07_12_064044) do
|
|||
t.integer "category", default: 0, null: false
|
||||
t.datetime "action_taken_at", precision: nil
|
||||
t.bigint "rule_ids", array: true
|
||||
t.bigint "application_id"
|
||||
t.index ["account_id"], name: "index_reports_on_account_id"
|
||||
t.index ["action_taken_by_account_id"], name: "index_reports_on_action_taken_by_account_id", where: "(action_taken_by_account_id IS NOT NULL)"
|
||||
t.index ["assigned_account_id"], name: "index_reports_on_assigned_account_id", where: "(assigned_account_id IS NOT NULL)"
|
||||
|
@ -1749,6 +1750,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_07_12_064044) do
|
|||
add_foreign_key "reports", "accounts", column: "assigned_account_id", on_delete: :nullify
|
||||
add_foreign_key "reports", "accounts", column: "target_account_id", name: "fk_eb37af34f0", on_delete: :cascade
|
||||
add_foreign_key "reports", "accounts", name: "fk_4b81f7522c", on_delete: :cascade
|
||||
add_foreign_key "reports", "oauth_applications", column: "application_id", on_delete: :nullify
|
||||
add_foreign_key "scheduled_expiration_statuses", "accounts", on_delete: :cascade
|
||||
add_foreign_key "scheduled_expiration_statuses", "statuses", on_delete: :cascade
|
||||
add_foreign_key "scheduled_statuses", "accounts", on_delete: :cascade
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue