Files
FEDEO/backend/db/schema/checkexecutions.ts
2026-01-06 12:07:43 +01:00

28 lines
660 B
TypeScript

import {
pgTable,
uuid,
timestamp,
text,
} from "drizzle-orm/pg-core"
import { checks } from "./checks"
export const checkexecutions = pgTable("checkexecutions", {
id: uuid("id").primaryKey().defaultRandom(),
createdAt: timestamp("created_at", { withTimezone: true })
.notNull()
.defaultNow(),
check: uuid("check").references(() => checks.id),
executedAt: timestamp("executed_at"),
// ❌ executed_by removed (was 0_profiles)
description: text("description"),
})
export type CheckExecution = typeof checkexecutions.$inferSelect
export type NewCheckExecution = typeof checkexecutions.$inferInsert