mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 17:45:53 +01:00
fix: preserve plugin run history on attribution cleanup
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
74f9c0ff50
commit
cc5ed5d8bb
2 files changed
+4
-4
No files matched your search
@@ -5,13 +5,13 @@ ALTER TABLE "plugin_job_runs"
|
||||
ADD COLUMN IF NOT EXISTS "triggered_by_actor_id" text;
|
||||
|
||||
ALTER TABLE "plugin_job_runs"
|
||||
ADD COLUMN IF NOT EXISTS "triggered_by_agent_id" uuid REFERENCES "agents"("id");
|
||||
ADD COLUMN IF NOT EXISTS "triggered_by_agent_id" uuid REFERENCES "agents"("id") ON DELETE SET NULL;
|
||||
|
||||
ALTER TABLE "plugin_job_runs"
|
||||
ADD COLUMN IF NOT EXISTS "triggered_by_user_id" text;
|
||||
|
||||
ALTER TABLE "plugin_job_runs"
|
||||
ADD COLUMN IF NOT EXISTS "triggered_by_run_id" uuid REFERENCES "heartbeat_runs"("id");
|
||||
ADD COLUMN IF NOT EXISTS "triggered_by_run_id" uuid REFERENCES "heartbeat_runs"("id") ON DELETE SET NULL;
|
||||
|
||||
ALTER TABLE "plugin_job_runs"
|
||||
ADD COLUMN IF NOT EXISTS "responsible_user_id" text;
|
||||
@@ -92,11 +92,11 @@ export const pluginJobRuns = pgTable(
|
||||
/** Host-derived actor id that triggered this run, when not scheduler-owned. */
|
||||
triggeredByActorId: text("triggered_by_actor_id"),
|
||||
/** Host-derived agent id that triggered this run, when applicable. */
|
||||
triggeredByAgentId: uuid("triggered_by_agent_id").references(() => agents.id),
|
||||
triggeredByAgentId: uuid("triggered_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
|
||||
/** Host-derived board/user id that triggered this run, when applicable. */
|
||||
triggeredByUserId: text("triggered_by_user_id"),
|
||||
/** Host-derived heartbeat run id that triggered this run, when applicable. */
|
||||
triggeredByRunId: uuid("triggered_by_run_id").references(() => heartbeatRuns.id),
|
||||
triggeredByRunId: uuid("triggered_by_run_id").references(() => heartbeatRuns.id, { onDelete: "set null" }),
|
||||
/** Responsible user resolved by the host for this run, when known. */
|
||||
responsibleUserId: text("responsible_user_id"),
|
||||
/** Current lifecycle state of this run. */
|
||||
|
||||
Reference in new issue
Block a user