16 lines
543 B
SQL
16 lines
543 B
SQL
CREATE TABLE `service_incidents` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`severity` text NOT NULL,
|
|
`title` text NOT NULL,
|
|
`message` text NOT NULL,
|
|
`status` text DEFAULT 'active' NOT NULL,
|
|
`created_by` text NOT NULL,
|
|
`resolved_by` text,
|
|
`resolution` text,
|
|
`started_at` text NOT NULL,
|
|
`resolved_at` text,
|
|
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE INDEX `idx_service_incidents_status_started` ON `service_incidents` (`status`,`started_at`); |