diff options
| author | Dhravya <[email protected]> | 2024-05-25 18:41:26 -0500 |
|---|---|---|
| committer | Dhravya <[email protected]> | 2024-05-25 18:41:26 -0500 |
| commit | 075f45986fd4d198292226e64afb71b3515576b4 (patch) | |
| tree | 5c728356cd0310f1c1c012fd6618c72a836c314b /apps/web/db | |
| parent | added social material (diff) | |
| download | supermemory-075f45986fd4d198292226e64afb71b3515576b4.tar.xz supermemory-075f45986fd4d198292226e64afb71b3515576b4.zip | |
refactored UI, with shared components and UI, better rules and million lint
Diffstat (limited to 'apps/web/db')
| -rw-r--r-- | apps/web/db/prepare.sql | 79 | ||||
| -rw-r--r-- | apps/web/db/wipe.sql | 7 |
2 files changed, 0 insertions, 86 deletions
diff --git a/apps/web/db/prepare.sql b/apps/web/db/prepare.sql deleted file mode 100644 index 4c8c2af6..00000000 --- a/apps/web/db/prepare.sql +++ /dev/null @@ -1,79 +0,0 @@ -CREATE TABLE `account` ( - `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, - `userId` text(255) NOT NULL, - `type` text(255) NOT NULL, - `provider` text(255) NOT NULL, - `providerAccountId` text(255) NOT NULL, - `refresh_token` text, - `access_token` text, - `expires_at` integer, - `token_type` text(255), - `scope` text(255), - `id_token` text, - `session_state` text(255), - `oauth_token_secret` text, - `oauth_token` text, - FOREIGN KEY (`userId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade -); ---> statement-breakpoint -CREATE TABLE `contentToSpace` ( - `contentId` integer NOT NULL, - `spaceId` integer NOT NULL, - PRIMARY KEY(`contentId`, `spaceId`), - FOREIGN KEY (`contentId`) REFERENCES `storedContent`(`id`) ON UPDATE no action ON DELETE cascade, - FOREIGN KEY (`spaceId`) REFERENCES `space`(`id`) ON UPDATE no action ON DELETE cascade -); ---> statement-breakpoint -CREATE TABLE `session` ( - `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, - `sessionToken` text(255) NOT NULL, - `userId` text(255) NOT NULL, - `expires` integer NOT NULL, - FOREIGN KEY (`userId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade -); ---> statement-breakpoint -CREATE TABLE `space` ( - `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, - `name` text DEFAULT 'none' NOT NULL, - `user` text(255), - FOREIGN KEY (`user`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade -); ---> statement-breakpoint -CREATE TABLE `storedContent` ( - `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, - `content` text NOT NULL, - `title` text(255), - `description` text(255), - `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 cascade -); ---> statement-breakpoint -CREATE TABLE `user` ( - `id` text(255) PRIMARY KEY NOT NULL, - `name` text(255), - `email` text(255) NOT NULL, - `emailVerified` integer DEFAULT CURRENT_TIMESTAMP, - `image` text(255) -); ---> statement-breakpoint -CREATE TABLE `verificationToken` ( - `identifier` text(255) NOT NULL, - `token` text(255) NOT NULL, - `expires` integer NOT NULL, - PRIMARY KEY(`identifier`, `token`) -); ---> 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 -CREATE INDEX `storedContent_savedAt_idx` ON `storedContent` (`savedAt`);--> statement-breakpoint -CREATE INDEX `storedContent_title_idx` ON `storedContent` (`title`);--> statement-breakpoint -CREATE INDEX `storedContent_user_idx` ON `storedContent` (`user`);
\ No newline at end of file diff --git a/apps/web/db/wipe.sql b/apps/web/db/wipe.sql deleted file mode 100644 index 456a48ad..00000000 --- a/apps/web/db/wipe.sql +++ /dev/null @@ -1,7 +0,0 @@ -DELETE FROM `account`; -DELETE FROM `contentToSpace`; -DELETE FROM `session`; -DELETE FROM `space`; -DELETE FROM `storedContent`; -DELETE FROM `user`; -DELETE FROM `verificationToken`;
\ No newline at end of file |