Merge branch 'feature/api-06-wiederanlauf-nachsynchronisierung-nach-core-ausfall' into feature/qa-05-abnahme-compliance-pruefung-core

# Conflicts:
#	go.mod
#	internal/moduletrust/cache.go
This commit is contained in:
sysops
2026-08-29 17:05:18 +02:00
7 changed files with 862 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
DROP TABLE resync_usage_buffer;
DROP TABLE resync_audit_buffer;
+22
View File
@@ -0,0 +1,22 @@
-- Wiederanlauf & Nachsynchronisierung nach Core-Ausfall (API-06, siehe
-- core-kanban/tickets/API-06.md) — lokale, PERSISTENTE Pufferqueue (kein
-- In-Memory) fuer Audit-Events und Nutzungszaehler-Deltas eines Moduls.
CREATE TABLE resync_audit_buffer (
id BIGSERIAL PRIMARY KEY,
seq BIGSERIAL,
tenant_slug TEXT NOT NULL,
actor TEXT NOT NULL,
action TEXT NOT NULL,
target TEXT NOT NULL DEFAULT '',
metadata JSONB NOT NULL DEFAULT '{}',
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE TABLE resync_usage_buffer (
id BIGSERIAL PRIMARY KEY,
seq BIGSERIAL,
tenant_slug TEXT NOT NULL,
metric TEXT NOT NULL,
delta BIGINT NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);