Woet
Explore posts from serversKKinde
•Created by Woet on 5/30/2024 in #💻┃support
Next.js app router: is it safe to do the authenticated check in the layout?
3 replies
DTDrizzle Team
•Created by Woet on 5/12/2024 in #help
Running schema migrations on the server
I'm currently in need to run schema migrations directly on the server instead of the CLI.
I'd need this because I'm programmatically provisioning a database on Neon with their API and I'd like to run the initial schema migration directly from my code on the server on that newly created database.
I found a couple months old question on this, without any other responses: https://github.com/drizzle-team/drizzle-orm/discussions/1901
Is there any way to make this possible without directly running SQL?
3 replies
DTDrizzle Team
•Created by Woet on 5/10/2024 in #help
Postgres - Unique constraint that allows null
5 replies
TTCTheo's Typesafe Cult
•Created by Woet on 4/21/2024 in #questions
Run migration with Drizzle for Neon
Sorry if this is a n00b question, but I'm having some troubles running a migration of a Neon database locally with the env.js.
I'm trying to run this with the command
pnpm run db:migrate
in the terminal
This is the script in package.json: "db:migrate": "tsx ./src/server/db/global/migrate.ts"
This gives me an error about the environment variables, anyone have an idea what I could do to fix this? :
I only need the DATABASE_URL in this migration and this is defined so I'm not sure why I'm getting an error on this.
11 replies