Files
ballistic-builder/src/db/schema/helpers/columns.helpers.ts
2024-11-20 09:02:38 -05:00

14 lines
388 B
TypeScript

import { timestamp } from "drizzle-orm/pg-core";
// columns.helpers.ts
export const timestamps = {
updated_at: timestamp().defaultNow().notNull(),
created_at: timestamp().defaultNow().notNull(),
deleted_at: timestamp(),
}
export const timestampsAllowNulls = {
updated_at: timestamp().defaultNow(),
created_at: timestamp().defaultNow(),
deleted_at: timestamp(),
}