t3-env setup with tsx

Hi, I wanted to have a script pnpm db:migrate to run the drizzle migrations to the database.
This is done with: tsx ./src/server/db/migrations.ts
The problem is that I cannot access any env variables this way, how would i make the env.mjs file run on this command so I can have access to them?

I tried adding the --env-file=.env flag but it only works locally and not on vercel
Was this page helpful?