aboutsummaryrefslogtreecommitdiff
path: root/apps/web/db/prepare.sql
diff options
context:
space:
mode:
authorDhravya <[email protected]>2024-04-11 02:38:41 -0700
committerDhravya <[email protected]>2024-04-11 02:38:41 -0700
commit22effd214c3bfa3e927604282da619bcc40b0d5f (patch)
tree281fa1f0b1bb2266c4f970d88dbcc1e594c04041 /apps/web/db/prepare.sql
parentMerge branch 'main' of https://github.com/Dhravya/supermemory (diff)
downloadsupermemory-22effd214c3bfa3e927604282da619bcc40b0d5f.tar.xz
supermemory-22effd214c3bfa3e927604282da619bcc40b0d5f.zip
prepare statement
Diffstat (limited to 'apps/web/db/prepare.sql')
-rw-r--r--apps/web/db/prepare.sql4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/web/db/prepare.sql b/apps/web/db/prepare.sql
index a4f9951d..dcba4d40 100644
--- a/apps/web/db/prepare.sql
+++ b/apps/web/db/prepare.sql
@@ -34,7 +34,7 @@ CREATE TABLE `session` (
--> statement-breakpoint
CREATE TABLE `space` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
- `name` text DEFAULT 'all' NOT NULL,
+ `name` text DEFAULT 'none' NOT NULL,
`user` text(255),
FOREIGN KEY (`user`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action
);
@@ -47,6 +47,7 @@ CREATE TABLE `storedContent` (
`url` text NOT NULL,
`savedAt` integer NOT NULL,
`baseUrl` text(255),
+ `type` text DEFAULT 'page',
`image` text(255),
`user` text(255),
FOREIGN KEY (`user`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action
@@ -69,6 +70,7 @@ CREATE TABLE `verificationToken` (
--> statement-breakpoint
CREATE INDEX `account_userId_idx` ON `account` (`userId`);--> statement-breakpoint
CREATE INDEX `session_userId_idx` ON `session` (`userId`);--> statement-breakpoint
+CREATE UNIQUE INDEX `space_name_unique` ON `space` (`name`);--> statement-breakpoint
CREATE INDEX `spaces_name_idx` ON `space` (`name`);--> statement-breakpoint
CREATE INDEX `spaces_user_idx` ON `space` (`user`);--> statement-breakpoint
CREATE INDEX `storedContent_url_idx` ON `storedContent` (`url`);--> statement-breakpoint