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