Init applications
This commit is contained in:
7
database/common.ts
Normal file
7
database/common.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { serial, timestamp } from "drizzle-orm/pg-core";
|
||||
|
||||
export const id = serial("id").primaryKey();
|
||||
|
||||
export const createdAt = timestamp("created_at").defaultNow().notNull();
|
||||
export const updatedAt = timestamp("updated_at").defaultNow()
|
||||
.$onUpdate(() => new Date()).notNull();
|
||||
Reference in New Issue
Block a user