Skip to content

Commit e8b8634

Browse files
committed
fix: drizzle snapshot
1 parent c6da812 commit e8b8634

4 files changed

Lines changed: 27 additions & 59 deletions

File tree

drizzle/0044_agent_threads_messages.sql

Lines changed: 0 additions & 56 deletions
This file was deleted.

drizzle/0044_square_vector.sql

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
CREATE TABLE "agent_messages" (
2+
"id" text PRIMARY KEY NOT NULL,
3+
"thread_id" text NOT NULL,
4+
"role" text NOT NULL,
5+
"content" text DEFAULT '' NOT NULL,
6+
"tool_calls" text DEFAULT '[]',
7+
"tool_call_id" text DEFAULT '',
8+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
9+
"seq" integer NOT NULL
10+
);
11+
--> statement-breakpoint
12+
CREATE TABLE "agent_threads" (
13+
"id" text PRIMARY KEY NOT NULL,
14+
"user_id" uuid NOT NULL,
15+
"title" text DEFAULT '' NOT NULL,
16+
"metadata" text DEFAULT '{}',
17+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
18+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
19+
);
20+
--> statement-breakpoint
21+
ALTER TABLE "agent_messages" ADD CONSTRAINT "agent_messages_thread_id_agent_threads_id_fk" FOREIGN KEY ("thread_id") REFERENCES "public"."agent_threads"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
22+
ALTER TABLE "agent_threads" ADD CONSTRAINT "agent_threads_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
23+
CREATE INDEX "idx_agent_messages_thread_seq" ON "agent_messages" USING btree ("thread_id","seq");--> statement-breakpoint
24+
CREATE INDEX "idx_agent_threads_user" ON "agent_threads" USING btree ("user_id");

drizzle/meta/0044_snapshot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "ecde1832-8454-4d86-8718-cd104b7ba59f",
2+
"id": "0a19dcd4-99b6-4dfa-a817-ebf5b3d3eaf5",
33
"prevId": "ce35d69e-cffa-425d-9858-33f3f8f7600c",
44
"version": "7",
55
"dialect": "postgresql",

drizzle/meta/_journal.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@
313313
{
314314
"idx": 44,
315315
"version": "7",
316-
"when": 1778436000000,
317-
"tag": "0044_agent_threads_messages",
316+
"when": 1778180826442,
317+
"tag": "0044_square_vector",
318318
"breakpoints": true
319319
}
320320
]

0 commit comments

Comments
 (0)