dimensionlab-website/drizzle/0000_dashboard_persistence.sql
2026-06-18 18:16:21 +02:00

20 lines
620 B
SQL

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`);