aboutsummaryrefslogtreecommitdiff
path: root/apps/web/db/prepare.sql
diff options
context:
space:
mode:
authoryxshv <[email protected]>2024-04-11 16:37:46 +0530
committeryxshv <[email protected]>2024-04-11 16:37:46 +0530
commit539f50367d2964579dbb6aa62876fab973b17840 (patch)
treea071ab8c30d2448207bc68c92a57d5663dd73724 /apps/web/db/prepare.sql
parentmerge pls (diff)
parentMerge branch 'main' of https://github.com/Dhravya/supermemory (diff)
downloadsupermemory-539f50367d2964579dbb6aa62876fab973b17840.tar.xz
supermemory-539f50367d2964579dbb6aa62876fab973b17840.zip
Merge branch 'main' of https://github.com/dhravya/supermemory
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