chore: germantax customer project

This commit is contained in:
e2e
2026-07-11 09:07:34 +02:00
commit 6f248700d7
145 changed files with 9830 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
-- ============================================================
-- Fabric audit event sink — the table Pikku Fabric writes AuditEvent
-- records to. This is the framework-level event stream (distinct from
-- any domain-level change history).
-- Columns mirror the AuditEvent shape (camelCase → snake_case for the
-- CamelCasePlugin kysely).
-- ============================================================
CREATE TABLE IF NOT EXISTS audit (
event_id TEXT PRIMARY KEY,
type TEXT NOT NULL,
source TEXT,
outcome TEXT,
occurred_at TEXT NOT NULL DEFAULT (datetime('now')),
function_id TEXT,
wire_type TEXT,
wire_id TEXT,
trace_id TEXT,
transaction_id TEXT,
query_id TEXT,
actor TEXT,
input TEXT,
metadata TEXT
);
CREATE INDEX IF NOT EXISTS idx_audit_type ON audit(type);
CREATE INDEX IF NOT EXISTS idx_audit_occurred ON audit(occurred_at);
CREATE INDEX IF NOT EXISTS idx_audit_function ON audit(function_id);
CREATE INDEX IF NOT EXISTS idx_audit_trace ON audit(trace_id);