Skip to content

Open-source status page, incident response and uptime monitoring

661 B
Raw Blame
CREATE TABLE `monitor_group` (
	`id` integer PRIMARY KEY NOT NULL,
	`workspace_id` integer NOT NULL,
	`page_id` integer NOT NULL,
	`name` text NOT NULL,
	`created_at` integer DEFAULT (strftime('%s', 'now')),
	`updated_at` integer DEFAULT (strftime('%s', 'now')),
	FOREIGN KEY (`workspace_id`) REFERENCES `workspace`(`id`) ON UPDATE no action ON DELETE cascade,
	FOREIGN KEY (`page_id`) REFERENCES `page`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
ALTER TABLE `monitors_to_pages` ADD `monitor_group_id` integer REFERENCES monitor_group(id);--> statement-breakpoint
ALTER TABLE `monitors_to_pages` ADD `group_order` integer DEFAULT 0;