supermemory/apps/web/migrations/0003_solid_boom_boom.sql
2024-07-01 07:55:16 -05:00

10 lines
No EOL
378 B
SQL

CREATE TABLE `canvas` (
`id` text PRIMARY KEY NOT NULL,
`title` text DEFAULT 'Untitled' NOT NULL,
`description` text DEFAULT 'Untitled' NOT NULL,
`url` text DEFAULT '' NOT NULL,
`userId` text NOT NULL,
FOREIGN KEY (`userId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE INDEX `canvas_user_userId` ON `canvas` (`userId`);