@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
sql 18 lines 543 Bytes
Raw
1 CREATE TABLE "posts" (
2 "id" serial PRIMARY KEY,
3 "user_id" integer NOT NULL,
4 "title" text NOT NULL,
5 "body" text NOT NULL,
6 "created_at" timestamp with time zone DEFAULT now() NOT NULL
7 );
8
9 --> statement-breakpoint
10 CREATE TABLE "users" (
11 "id" serial PRIMARY KEY,
12 "email" text NOT NULL UNIQUE,
13 "name" text NOT NULL,
14 "created_at" timestamp with time zone DEFAULT now() NOT NULL
15 );
16
17 --> statement-breakpoint
18 ALTER TABLE "posts" ADD CONSTRAINT "posts_user_id_users_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE;