Initial open source release

This commit is contained in:
A 2026-06-04 01:37:39 +08:00
commit 74992e893f
377 changed files with 118084 additions and 0 deletions

View file

@ -0,0 +1,12 @@
CREATE TABLE IF NOT EXISTS user_update_watermarks (
user_id BIGINT PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE,
contiguous_pts INT NOT NULL DEFAULT 0,
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS user_update_events_retention_idx
ON user_update_events (user_id, date, pts);
CREATE INDEX IF NOT EXISTS dispatch_outbox_failed_cleanup_idx
ON dispatch_outbox (status, updated_at, target_user_id, id)
WHERE status = 'failed';