fix(providers): heartbeat FK SET NULL + tenant-scoped tx-safe DeleteProvider (#1034)

This commit is contained in:
viettranx committed 2026-04-27 12:00:06 +07:00
1 parent 2be867bebb
commit ed7c371cb2
8 files changed
+373 -9

No files matched your search

+1 -1
View File
@@ -1272,7 +1272,7 @@ CREATE TABLE IF NOT EXISTS agent_heartbeats (
enabled BOOLEAN NOT NULL DEFAULT 0,
interval_sec INT NOT NULL DEFAULT 1800,
prompt TEXT,
provider_id TEXT REFERENCES llm_providers(id),
provider_id TEXT REFERENCES llm_providers(id) ON DELETE SET NULL,
model VARCHAR(200),
isolated_session BOOLEAN NOT NULL DEFAULT 1,
light_context BOOLEAN NOT NULL DEFAULT 0,