1
+ CREATE TABLE "account " (
2
+ " userId" text NOT NULL ,
3
+ " type" text NOT NULL ,
4
+ " provider" text NOT NULL ,
5
+ " providerAccountId" text NOT NULL ,
6
+ " refresh_token" text ,
7
+ " access_token" text ,
8
+ " expires_at" integer ,
9
+ " token_type" text ,
10
+ " scope" text ,
11
+ " id_token" text ,
12
+ " session_state" text
13
+ );
14
+ -- > statement-breakpoint
15
+ CREATE TABLE "authenticator " (
16
+ " credentialID" text NOT NULL ,
17
+ " userId" text NOT NULL ,
18
+ " providerAccountId" text NOT NULL ,
19
+ " credentialPublicKey" text NOT NULL ,
20
+ " counter" integer NOT NULL ,
21
+ " credentialDeviceType" text NOT NULL ,
22
+ " credentialBackedUp" boolean NOT NULL ,
23
+ " transports" text ,
24
+ CONSTRAINT " authenticator_credentialID_unique" UNIQUE(" credentialID" )
25
+ );
26
+ -- > statement-breakpoint
27
+ CREATE TABLE "session " (
28
+ " sessionToken" text PRIMARY KEY NOT NULL ,
29
+ " userId" text NOT NULL ,
30
+ " expires" timestamp NOT NULL
31
+ );
32
+ -- > statement-breakpoint
33
+ CREATE TABLE "user " (
34
+ " id" text PRIMARY KEY NOT NULL ,
35
+ " name" text ,
36
+ " email" text ,
37
+ " emailVerified" timestamp ,
38
+ " image" text ,
39
+ CONSTRAINT " user_email_unique" UNIQUE(" email" )
40
+ );
41
+ -- > statement-breakpoint
42
+ CREATE TABLE "verificationToken " (
43
+ " identifier" text NOT NULL ,
44
+ " token" text NOT NULL ,
45
+ " expires" timestamp NOT NULL
46
+ );
47
+ -- > statement-breakpoint
48
+ CREATE TABLE "waitlist " (
49
+ " id" serial PRIMARY KEY NOT NULL ,
50
+ " email" varchar (255 ) NOT NULL ,
51
+ " created_at" timestamp DEFAULT now()
52
+ );
53
+ -- > statement-breakpoint
54
+ ALTER TABLE " account" ADD CONSTRAINT " account_userId_user_id_fk" FOREIGN KEY (" userId" ) REFERENCES " public" ." user" (" id" ) ON DELETE cascade ON UPDATE no action;-- > statement-breakpoint
55
+ ALTER TABLE " authenticator" ADD CONSTRAINT " authenticator_userId_user_id_fk" FOREIGN KEY (" userId" ) REFERENCES " public" ." user" (" id" ) ON DELETE cascade ON UPDATE no action;-- > statement-breakpoint
56
+ ALTER TABLE " session" ADD CONSTRAINT " session_userId_user_id_fk" FOREIGN KEY (" userId" ) REFERENCES " public" ." user" (" id" ) ON DELETE cascade ON UPDATE no action;
0 commit comments