Drizzle/better-auth + Local PSQL
I have the biggest issue trying to setup drizzle with my project and I don't believe it should be this complicated as I am facing currently. Someone with more experience please help me out and explain to me what I am doing wrong.
So I am trying to setup better-auth with Drizzle + my local PostgreSQL and I am using the latest version of Next js for my project.
I basically start of my initialising my next js project by running the regular command
And I then create my
What I change here is that I change the
So I am trying to setup better-auth with Drizzle + my local PostgreSQL and I am using the latest version of Next js for my project.
I basically start of my initialising my next js project by running the regular command
npx create-next-app@latest (app router no src-folder) and go then install drizzle following the docs and run the commands that are shown in the docs/guide. I create my .env file and setup my DATABASE_URL="postgres://postgres:mypassword@localhost:5432/postgres" and move on to creating my db directory and place the index.ts file inside of it which holds this code. And I then create my
schema.ts file. This is basically just copied over from the docs. Afterwards I move on to create my drizzle.config.ts file but I slightly modify it. What I change here is that I change the
schema: './src/db/schema.ts', to schema: './db/schema.ts', for app directory in next js.