feat: add dashboard persistence store

This commit is contained in:
vince 2026-06-18 18:09:17 +02:00
parent 5eeec0dcb5
commit 5e42ee8869
18 changed files with 1181 additions and 19 deletions

View file

@ -0,0 +1,20 @@
CREATE TABLE `dashboard_documents` (
`id` text PRIMARY KEY NOT NULL,
`current_revision_id` text,
`created_at` integer NOT NULL,
`updated_at` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE `dashboard_revisions` (
`id` text PRIMARY KEY NOT NULL,
`dashboard_id` text NOT NULL,
`schema_version` text NOT NULL,
`document` text NOT NULL,
`actor` text NOT NULL,
`message` text,
`operation` text NOT NULL,
`source_revision_id` text,
`created_at` integer NOT NULL
);
--> statement-breakpoint
CREATE INDEX `idx_dashboard_revisions_dashboard_created` ON `dashboard_revisions` (`dashboard_id`,`created_at`);