You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
794 B
16 lines
794 B
CREATE TABLE `agent_documents` (
|
|
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
`user_id` integer NOT NULL,
|
|
`session_id` text,
|
|
`type` text(20) DEFAULT 'document' NOT NULL,
|
|
`title` text(255) NOT NULL,
|
|
`content` text NOT NULL,
|
|
`summary` text,
|
|
`tags` text,
|
|
`created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL,
|
|
`updated_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE INDEX `idx_agent_documents_user_id` ON `agent_documents` (`user_id`);--> statement-breakpoint
|
|
CREATE INDEX `idx_agent_documents_user_type` ON `agent_documents` (`user_id`,`type`);--> statement-breakpoint
|
|
CREATE INDEX `idx_agent_documents_user_session` ON `agent_documents` (`user_id`,`session_id`);
|