amgau
amgau
Explore posts from servers
HHono
Created by amgau on 8/15/2024 in #help
RPC Type confusion
Solved. This was related to a drizzle update, the id being number | bigint seemingly broke the types. adding id as number resolved this.
6 replies
DTDrizzle Team
Created by amgau on 5/15/2024 in #help
Having an issue with sqlite running `drizzle-kit generate`.
import dotenv from "dotenv";
import type { Config } from "drizzle-kit";
dotenv.config();

export default {
dialect: "sqlite",
schema: "./src/lib/schema.ts",
out: "./drizzle",
dbCredentials: {
url: process.env.DB_PATH!,
},
} satisfies Config;
import dotenv from "dotenv";
import type { Config } from "drizzle-kit";
dotenv.config();

export default {
dialect: "sqlite",
schema: "./src/lib/schema.ts",
out: "./drizzle",
dbCredentials: {
url: process.env.DB_PATH!,
},
} satisfies Config;
Here is the drizzle config
3 replies
DTDrizzle Team
Created by Marťafiixek on 12/11/2023 in #help
How do you structure your schemas?
might make more sense to just make index a barrel, but I haven't put too much thought into it
18 replies
DTDrizzle Team
Created by Marťafiixek on 12/11/2023 in #help
How do you structure your schemas?
import {account, invoice} from '~/db'
18 replies
DTDrizzle Team
Created by Marťafiixek on 12/11/2023 in #help
How do you structure your schemas?
import user from '~/db/user.ts"
18 replies
DTDrizzle Team
Created by Marťafiixek on 12/11/2023 in #help
How do you structure your schemas?
don't know if it makes sense for most, but for me it kinda does, especially when importing
18 replies
DTDrizzle Team
Created by Marťafiixek on 12/11/2023 in #help
How do you structure your schemas?
index.ts with categories, transactions, accounts, invoices, etc.
18 replies
DTDrizzle Team
Created by Marťafiixek on 12/11/2023 in #help
How do you structure your schemas?
so I have users.ts with auth stuff, preferences, etc.
18 replies
DTDrizzle Team
Created by Marťafiixek on 12/11/2023 in #help
How do you structure your schemas?
Just logical groupings, and then core business related things are in index.ts
18 replies
DTDrizzle Team
Created by Marťafiixek on 12/11/2023 in #help
How do you structure your schemas?
I have a "db" folder, inside that I have things grouped by domain inside of a single file
18 replies