mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
Sync hierarchy updates (#2087)
* Add parent sync orchestration * Pass sync object to dependents
This commit is contained in:
parent
9fa3698823
commit
8648f11413
11 changed files with 111 additions and 30 deletions
5
db/migrate/20250411140604_add_parent_syncs.rb
Normal file
5
db/migrate/20250411140604_add_parent_syncs.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddParentSyncs < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_reference :syncs, :parent, foreign_key: { to_table: :syncs }, type: :uuid
|
||||
end
|
||||
end
|
5
db/schema.rb
generated
5
db/schema.rb
generated
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2025_04_10_144939) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2025_04_11_140604) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
enable_extension "plpgsql"
|
||||
|
@ -547,6 +547,8 @@ ActiveRecord::Schema[7.2].define(version: 2025_04_10_144939) do
|
|||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.text "error_backtrace", array: true
|
||||
t.uuid "parent_id"
|
||||
t.index ["parent_id"], name: "index_syncs_on_parent_id"
|
||||
t.index ["syncable_type", "syncable_id"], name: "index_syncs_on_syncable"
|
||||
end
|
||||
|
||||
|
@ -665,6 +667,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_04_10_144939) do
|
|||
add_foreign_key "security_prices", "securities"
|
||||
add_foreign_key "sessions", "impersonation_sessions", column: "active_impersonator_session_id"
|
||||
add_foreign_key "sessions", "users"
|
||||
add_foreign_key "syncs", "syncs", column: "parent_id"
|
||||
add_foreign_key "taggings", "tags"
|
||||
add_foreign_key "tags", "families"
|
||||
add_foreign_key "tool_calls", "messages"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue