Does anyone have a working example repo of T3 stack with drizzle and postgres?

I am trying move away from prisma, so I decided to create a new repo with drizzle instead and incrementally move over my code and changes prisma to drizzle. However after trying this I could not find many examples of using drizzle with postgres. The T3 stack now has drizzle support on init through the cli, but its made with mysql2 in mind. Also there are no docs for drizzle on the T3 site as of now. After looking online I can see many different ways of connecting to postgres and its very confusing. I also am going to be using neon for my postgres db, if that changes anything. I am also having trouble with applying the migration files once it has been generated.
Just wondering if anyone has attempeted this and could point me in the right direction. Thanks.
2 Replies
Ardianor
Ardianor14mo ago
A bit late and you probably already figured it out, but I ran into a similar roadblock in a personal project and decided to make a repo with a template of where I ended up. Essentially it's T3 with App Router, NextAuth, and DrizzleORM but with anything pointing towards Planetscale / MySQL now working with Postgres. It has also been preconfigured with JWTs and custom roles but you can just delete that stuff from auth.ts if it's unnecessary. Hope it helps: https://github.com/EthanAmato/T3-Postgres-Drizzle-Template
GitHub
GitHub - EthanAmato/T3-Postgres-Drizzle-Template: A Quick Template ...
A Quick Template for converting the experimental App router version for the T3 stack into connecting to a PostgreSQL server instead of planetscale / MySQL. Uses JWT tokens and has template code for...
George
GeorgeOP14mo ago
Yeh I managed to figure it out, took way too long to find where to push migrations in the drizzle docs. Thanks for this anyway, its very helpful.
Want results from more Discord servers?
Add your server