bunches of database modeling and drizzle setup

This commit is contained in:
2024-11-18 23:48:33 -05:00
parent 53d4e1211d
commit 1d27bcc20a
14 changed files with 2181 additions and 2 deletions

10
src/db/schema/accounts.ts Normal file
View File

@@ -0,0 +1,10 @@
import { pgTable, integer, varchar } from "drizzle-orm/pg-core";
import { sql } from "drizzle-orm";
import { timestamps } from "./columns.helpers";
export const accounts = pgTable("bal_accounts", {
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "accountsid_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
first_name: varchar({ length: 40 }),
last_name: varchar({ length: 40 }),
...timestamps
})