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.
822 B ยท 18 lines
SQL
at incident-api
123456789101112131415161718CREATE TABLE `api_key` ( `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, `name` text NOT NULL, `description` text, `prefix` text NOT NULL, `hashed_token` text NOT NULL, `workspace_id` integer NOT NULL, `created_by_id` integer NOT NULL, `created_at` integer DEFAULT (strftime('%s', 'now')), `expires_at` integer, `last_used_at` integer, FOREIGN KEY (`workspace_id`) REFERENCES `workspace`(`id`) ON UPDATE no action ON DELETE cascade, FOREIGN KEY (`created_by_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade);--> statement-breakpointCREATE UNIQUE INDEX `api_key_prefix_unique` ON `api_key` (`prefix`);--> statement-breakpointCREATE UNIQUE INDEX `api_key_hashed_token_unique` ON `api_key` (`hashed_token`);--> statement-breakpointCREATE INDEX `api_key_prefix_idx` ON `api_key` (`prefix`);