add submission event account id
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class AddAccountIdToSubmissionEvents < ActiveRecord::Migration[8.0]
|
||||||
|
def change
|
||||||
|
add_reference :submission_events, :account, null: true, foreign_key: true, index: true
|
||||||
|
end
|
||||||
|
end
|
||||||
+4
-1
@@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[8.0].define(version: 2025_09_22_053744) do
|
ActiveRecord::Schema[8.0].define(version: 2025_11_21_090556) do
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "btree_gin"
|
enable_extension "btree_gin"
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
@@ -293,6 +293,8 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_22_053744) do
|
|||||||
t.datetime "event_timestamp", null: false
|
t.datetime "event_timestamp", null: false
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
|
t.bigint "account_id"
|
||||||
|
t.index ["account_id"], name: "index_submission_events_on_account_id"
|
||||||
t.index ["created_at"], name: "index_submission_events_on_created_at"
|
t.index ["created_at"], name: "index_submission_events_on_created_at"
|
||||||
t.index ["submission_id"], name: "index_submission_events_on_submission_id"
|
t.index ["submission_id"], name: "index_submission_events_on_submission_id"
|
||||||
t.index ["submitter_id"], name: "index_submission_events_on_submitter_id"
|
t.index ["submitter_id"], name: "index_submission_events_on_submitter_id"
|
||||||
@@ -506,6 +508,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_22_053744) do
|
|||||||
add_foreign_key "oauth_access_grants", "users", column: "resource_owner_id"
|
add_foreign_key "oauth_access_grants", "users", column: "resource_owner_id"
|
||||||
add_foreign_key "oauth_access_tokens", "oauth_applications", column: "application_id"
|
add_foreign_key "oauth_access_tokens", "oauth_applications", column: "application_id"
|
||||||
add_foreign_key "oauth_access_tokens", "users", column: "resource_owner_id"
|
add_foreign_key "oauth_access_tokens", "users", column: "resource_owner_id"
|
||||||
|
add_foreign_key "submission_events", "accounts"
|
||||||
add_foreign_key "submission_events", "submissions"
|
add_foreign_key "submission_events", "submissions"
|
||||||
add_foreign_key "submission_events", "submitters"
|
add_foreign_key "submission_events", "submitters"
|
||||||
add_foreign_key "submissions", "templates"
|
add_foreign_key "submissions", "templates"
|
||||||
|
|||||||
Reference in New Issue
Block a user