@okhay-p/mivra 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/THIRD_PARTY_NOTICES.md +4 -0
- package/dist/chunk-3RMHLZ2Z.js +736 -0
- package/dist/chunk-3RMHLZ2Z.js.map +7 -0
- package/dist/chunk-EICBRY5M.js +381 -0
- package/dist/chunk-EICBRY5M.js.map +7 -0
- package/dist/chunk-FBDML53R.js +933 -0
- package/dist/chunk-FBDML53R.js.map +7 -0
- package/dist/chunk-KE5ZEREE.js +212 -0
- package/dist/chunk-KE5ZEREE.js.map +7 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +7 -0
- package/dist/chunk-TBAR47I6.js +32 -0
- package/dist/chunk-TBAR47I6.js.map +7 -0
- package/dist/cli.js +256 -11188
- package/dist/cli.js.map +4 -4
- package/dist/client-VU3KWV3U.js +12 -0
- package/dist/client-VU3KWV3U.js.map +7 -0
- package/dist/extract-child.js +107 -173
- package/dist/extract-child.js.map +3 -3
- package/dist/key-check-WJ4CVZV5.js +8 -0
- package/dist/key-check-WJ4CVZV5.js.map +7 -0
- package/dist/start-3J3JSJEX.js +10899 -0
- package/dist/start-3J3JSJEX.js.map +7 -0
- package/drizzle/0012_overconfident_the_santerians.sql +66 -0
- package/drizzle/meta/0012_snapshot.json +1741 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/web/assets/index-BUYWW1Mc.js +406 -0
- package/web/assets/index-Cmq-m9fI.css +1 -0
- package/web/assets/{render.worker-Bw6rO7Qu.js → render.worker-BEpv9w1x.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/index-Cv4wPRY7.css +0 -1
- package/web/assets/index-aRUQfiYR.js +0 -406
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
CREATE TABLE `note_chunks` (
|
|
2
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
+
`note_id` text NOT NULL,
|
|
4
|
+
`seq` integer NOT NULL,
|
|
5
|
+
`heading` text,
|
|
6
|
+
`text` text NOT NULL,
|
|
7
|
+
FOREIGN KEY (`note_id`) REFERENCES `notes`(`id`) ON UPDATE no action ON DELETE cascade
|
|
8
|
+
);
|
|
9
|
+
--> statement-breakpoint
|
|
10
|
+
CREATE UNIQUE INDEX `note_chunks_note_seq_idx` ON `note_chunks` (`note_id`,`seq`);--> statement-breakpoint
|
|
11
|
+
CREATE TABLE `note_links` (
|
|
12
|
+
`note_id` text NOT NULL,
|
|
13
|
+
`target` text NOT NULL,
|
|
14
|
+
`kind` text NOT NULL,
|
|
15
|
+
PRIMARY KEY(`note_id`, `target`, `kind`),
|
|
16
|
+
FOREIGN KEY (`note_id`) REFERENCES `notes`(`id`) ON UPDATE no action ON DELETE cascade
|
|
17
|
+
);
|
|
18
|
+
--> statement-breakpoint
|
|
19
|
+
CREATE TABLE `note_tags` (
|
|
20
|
+
`note_id` text NOT NULL,
|
|
21
|
+
`tag` text NOT NULL,
|
|
22
|
+
PRIMARY KEY(`note_id`, `tag`),
|
|
23
|
+
FOREIGN KEY (`note_id`) REFERENCES `notes`(`id`) ON UPDATE no action ON DELETE cascade
|
|
24
|
+
);
|
|
25
|
+
--> statement-breakpoint
|
|
26
|
+
CREATE INDEX `note_tags_tag_idx` ON `note_tags` (`tag`);--> statement-breakpoint
|
|
27
|
+
CREATE TABLE `notes` (
|
|
28
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
29
|
+
`import_id` text NOT NULL,
|
|
30
|
+
`path` text NOT NULL,
|
|
31
|
+
`title` text NOT NULL,
|
|
32
|
+
`title_key` text NOT NULL,
|
|
33
|
+
`aliases` text NOT NULL,
|
|
34
|
+
`body` text NOT NULL,
|
|
35
|
+
`hash` text NOT NULL,
|
|
36
|
+
`created_at` integer NOT NULL,
|
|
37
|
+
`updated_at` integer NOT NULL,
|
|
38
|
+
FOREIGN KEY (`import_id`) REFERENCES `vault_imports`(`id`) ON UPDATE no action ON DELETE cascade
|
|
39
|
+
);
|
|
40
|
+
--> statement-breakpoint
|
|
41
|
+
CREATE UNIQUE INDEX `notes_import_path_idx` ON `notes` (`import_id`,`path`);--> statement-breakpoint
|
|
42
|
+
CREATE INDEX `notes_import_title_idx` ON `notes` (`import_id`,`title_key`);--> statement-breakpoint
|
|
43
|
+
CREATE TABLE `vault_imports` (
|
|
44
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
45
|
+
`name` text NOT NULL,
|
|
46
|
+
`source` text NOT NULL,
|
|
47
|
+
`created_at` integer NOT NULL,
|
|
48
|
+
`updated_at` integer NOT NULL
|
|
49
|
+
);
|
|
50
|
+
--> statement-breakpoint
|
|
51
|
+
CREATE UNIQUE INDEX `vault_imports_name_idx` ON `vault_imports` (`name`);--> statement-breakpoint
|
|
52
|
+
-- Hand-written: Drizzle doesn't model FTS5. An external-content index over note_chunks, kept in sync by triggers, which also fire on foreign-key cascades.
|
|
53
|
+
CREATE VIRTUAL TABLE `note_chunks_fts` USING fts5(`heading`, `text`, content=`note_chunks`, content_rowid=`id`, tokenize='porter unicode61 remove_diacritics 2');
|
|
54
|
+
--> statement-breakpoint
|
|
55
|
+
CREATE TRIGGER `note_chunks_fts_insert` AFTER INSERT ON `note_chunks` BEGIN
|
|
56
|
+
INSERT INTO `note_chunks_fts`(rowid, `heading`, `text`) VALUES (new.`id`, new.`heading`, new.`text`);
|
|
57
|
+
END;
|
|
58
|
+
--> statement-breakpoint
|
|
59
|
+
CREATE TRIGGER `note_chunks_fts_delete` AFTER DELETE ON `note_chunks` BEGIN
|
|
60
|
+
INSERT INTO `note_chunks_fts`(`note_chunks_fts`, rowid, `heading`, `text`) VALUES ('delete', old.`id`, old.`heading`, old.`text`);
|
|
61
|
+
END;
|
|
62
|
+
--> statement-breakpoint
|
|
63
|
+
CREATE TRIGGER `note_chunks_fts_update` AFTER UPDATE ON `note_chunks` BEGIN
|
|
64
|
+
INSERT INTO `note_chunks_fts`(`note_chunks_fts`, rowid, `heading`, `text`) VALUES ('delete', old.`id`, old.`heading`, old.`text`);
|
|
65
|
+
INSERT INTO `note_chunks_fts`(rowid, `heading`, `text`) VALUES (new.`id`, new.`heading`, new.`text`);
|
|
66
|
+
END;
|