From 86d74e3f32dd5bccc8df195b55391e206df9a1c4 Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Fri, 27 Dec 2024 16:09:29 +0000
Subject: feat: Implement highlights support for links. Fixes #620

---
 packages/db/drizzle/0035_gorgeous_may_parker.sql | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 packages/db/drizzle/0035_gorgeous_may_parker.sql

(limited to 'packages/db/drizzle/0035_gorgeous_may_parker.sql')

diff --git a/packages/db/drizzle/0035_gorgeous_may_parker.sql b/packages/db/drizzle/0035_gorgeous_may_parker.sql
new file mode 100644
index 00000000..52242a43
--- /dev/null
+++ b/packages/db/drizzle/0035_gorgeous_may_parker.sql
@@ -0,0 +1,15 @@
+CREATE TABLE `highlights` (
+	`id` text PRIMARY KEY NOT NULL,
+	`bookmarkId` text NOT NULL,
+	`userId` text NOT NULL,
+	`startOffset` integer NOT NULL,
+	`endOffset` integer NOT NULL,
+	`color` text DEFAULT 'yellow' NOT NULL,
+	`note` text,
+	`createdAt` integer NOT NULL,
+	FOREIGN KEY (`bookmarkId`) REFERENCES `bookmarks`(`id`) ON UPDATE no action ON DELETE cascade,
+	FOREIGN KEY (`userId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE INDEX `highlights_bookmarkId_idx` ON `highlights` (`bookmarkId`);--> statement-breakpoint
+CREATE INDEX `highlights_userId_idx` ON `highlights` (`userId`);
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

