Files
Sauci/apps/api/drizzle/0008_residual_realtime.sql
T
jjbrunton 006761d3b0 feat(backend): add standalone data plane
Replace the Supabase application data plane with the Node/PostgreSQL API, migrate mobile, admin, web, and MCP callers, add controlled cutover tooling, and define hardened Dokploy infrastructure.
2026-08-28 14:42:11 +01:00

16 lines
693 B
SQL

ALTER TABLE profiles
ADD COLUMN IF NOT EXISTS last_nudge_sent_at timestamptz;
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS live_draw_sessions (
couple_id uuid PRIMARY KEY REFERENCES couples(id) ON DELETE CASCADE,
strokes jsonb NOT NULL DEFAULT '[]'::jsonb,
revision bigint NOT NULL DEFAULT 1,
updated_by uuid NOT NULL REFERENCES profiles(id) ON DELETE CASCADE,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(),
CONSTRAINT live_draw_sessions_strokes_array CHECK (jsonb_typeof(strokes) = 'array')
);
--> statement-breakpoint
CREATE INDEX IF NOT EXISTS live_draw_sessions_updated_at_idx
ON live_draw_sessions(updated_at DESC);