more database design

This commit is contained in:
2024-11-20 09:02:38 -05:00
parent 429d6d2b26
commit 7ccc6d10e8
14 changed files with 41 additions and 26 deletions

View 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(),
}