Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
1.4 kB ยท 27 lines
SQL
at incident-api
123456789101112131415161718192021222324252627CREATE TABLE `incident_new` ( `id` integer PRIMARY KEY NOT NULL, `title` text DEFAULT '' NOT NULL, `summary` text DEFAULT '' NOT NULL, `status` text DEFAULT 'triage' NOT NULL, `monitor_id` integer, `workspace_id` integer, `started_at` integer DEFAULT (strftime('%s', 'now')) NOT NULL, `acknowledged_at` integer, `acknowledged_by` integer, `resolved_at` integer, `resolved_by` integer, `created_at` integer DEFAULT (strftime('%s', 'now')), `updated_at` integer DEFAULT (strftime('%s', 'now')), FOREIGN KEY (`monitor_id`) REFERENCES `monitor`(`id`) ON UPDATE no action ON DELETE set default, FOREIGN KEY (`workspace_id`) REFERENCES `workspace`(`id`) ON UPDATE no action ON DELETE no action, FOREIGN KEY (`acknowledged_by`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action, FOREIGN KEY (`resolved_by`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action);--> statement-breakpointCREATE UNIQUE INDEX `composite_incident_new_id_started_at_unique` ON `incident_new` (`id`,`started_at`);--> statement-breakpointINSERT INTO incident_new(`id`,`title`,`summary`,`status`,`monitor_id`,`workspace_id`,`started_at`,`acknowledged_at`,`acknowledged_by`,`resolved_at`,`resolved_by`,`created_at`,`updated_at`) SELECT * FROM incident;--> statement-breakpointDROP TABLE incident;--> statement-breakpointALTER TABLE incident_new RENAME TO incident;