Drizzle: Enable snake casing by default#91
Drizzle: Enable snake casing by default#91tomhaerter wants to merge 2 commits intoMail-0:stagingfrom tomhaerter:drizzle-snake-case
Conversation
|
@tomhaerter is attempting to deploy a commit to the Projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Also, to perhaps add, I introduced timestamp helpers and added timezone by default. Feel free to remove or change that as needed (totally overlooked I did that). Or let me know, and I revert that |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@Praashh will this break anything |
let's not merge this, I'll test it locally |
|
We're still early, there's nothing to "break" |
|
@Praashh anything I can do to help to get this merged? |
|
We're looking into migrating into Prisma, closing for now |
|
Opening again - would be beneficial when writing new schemas |
WalkthroughThe changes introduce a new configuration option, Changes
Sequence Diagram(s)sequenceDiagram
participant App as Application (index.ts)
participant Drizzle as Drizzle ORM
participant Formatter as Identifier Formatter
App->>Drizzle: Call drizzle(conn, { schema, casing: 'snake_case' })
Drizzle->>Formatter: Apply snake_case formatting
Formatter-->>Drizzle: Return formatted identifiers
Drizzle-->>App: Return configured database connection
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🔇 Additional comments (13)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@ahmetskilinc updated my changes to reflect the latest schema. shouldn't be a breaking change |
Quick PR to switch Drizzle ORM to snake_case by default. Here's the breakdown:
{ casing: "snake_case" }to the drizzle init.Should keep our DB columns consistent. Docs here: https://orm.drizzle.team/docs/sql-schema-declaration#camel-and-snake-casing
Summary by CodeRabbit
New Features
Refactor