Try to hack auth
This commit is contained in:
parent
d88eae7230
commit
030b23985d
19 changed files with 330 additions and 673 deletions
11
lib/db/migrations/0001_petite_sue_storm.sql
Normal file
11
lib/db/migrations/0001_petite_sue_storm.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
CREATE TABLE IF NOT EXISTS "chats" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"role" text NOT NULL,
|
||||
"userId" text NOT NULL
|
||||
);
|
||||
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE "chats" ADD CONSTRAINT "chats_userId_users_id_fk" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE no action ON UPDATE no action;
|
||||
EXCEPTION
|
||||
WHEN duplicate_object THEN null;
|
||||
END $$;
|
||||
Loading…
Add table
Add a link
Reference in a new issue