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.
739 B ยท 23 lines
TypeScript
123456789101112131415161718192021222324import { sql } from "drizzle-orm";import { index, integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
import { workspace } from "../workspaces";
export const application = sqliteTable( "application", { id: integer("id").primaryKey(), name: text("name"), // friendly name for the project dsn: text("dsn").unique(), // dsn for the source
workspaceId: integer("workspace_id").references(() => workspace.id),
createdAt: integer("created_at", { mode: "timestamp" }).default( sql`(strftime('%s', 'now'))`, ), updatedAt: integer("updated_at", { mode: "timestamp" }).default( sql`(strftime('%s', 'now'))`, ), }, (t) => [index("application_workspace_id_idx").on(t.workspaceId)],);