freshyo/apps/backend/drizzle/0002_wandering_lifeguard.sql
2026-01-24 00:13:15 +05:30

9 lines
No EOL
563 B
SQL

CREATE TABLE "mf"."user_creds" (
"id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."user_creds_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
"user_id" integer NOT NULL,
"user_password" varchar(255) NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "unique_user_cred" UNIQUE("user_id")
);
--> statement-breakpoint
ALTER TABLE "mf"."user_creds" ADD CONSTRAINT "user_creds_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;