mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
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.
16 lines
693 B
SQL
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);
|