FDN-01: repository & projektgerüst
Git-Repository für bestehenden archivdms-Code initialisiert, Branch-/Commit-Konvention (feature/<ticket>-<slug>-Branches, Ticket-Prefix in Commit-Nachricht) etabliert.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
-- Dokumentation, siehe README.md. Wird zur Laufzeit idempotent von
|
||||
-- internal/storage/reminders.go initReminderSchema() erzeugt.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS reminders (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
document_id BIGINT NOT NULL REFERENCES documents(id),
|
||||
tenant_id BIGINT NOT NULL,
|
||||
user_id BIGINT NOT NULL,
|
||||
due_date TIMESTAMPTZ NOT NULL,
|
||||
note TEXT,
|
||||
status TEXT NOT NULL DEFAULT 'open', -- open|done|dismissed
|
||||
notified_at TIMESTAMPTZ,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_reminders_tenant_due ON reminders(tenant_id, due_date) WHERE status = 'open';
|
||||
CREATE INDEX IF NOT EXISTS idx_reminders_document ON reminders(document_id);
|
||||
Reference in New Issue
Block a user