Openstatus www.openstatus.dev
at main 18 lines 634 B view raw
1import { sql } from "drizzle-orm"; 2import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; 3import { workspace } from "../workspaces"; 4 5export const application = sqliteTable("application", { 6 id: integer("id").primaryKey(), 7 name: text("name"), // friendly name for the project 8 dsn: text("dsn").unique(), // dsn for the source 9 10 workspaceId: integer("workspace_id").references(() => workspace.id), 11 12 createdAt: integer("created_at", { mode: "timestamp" }).default( 13 sql`(strftime('%s', 'now'))`, 14 ), 15 updatedAt: integer("updated_at", { mode: "timestamp" }).default( 16 sql`(strftime('%s', 'now'))`, 17 ), 18});