mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
more database design
This commit is contained in:
14
src/db/schema/helpers/columns.helpers.ts
Normal file
14
src/db/schema/helpers/columns.helpers.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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(),
|
||||
}
|
||||
Reference in New Issue
Block a user