Replies: 4 comments
-
Posted as an idea to write an official documentation for it here #71534 |
Beta Was this translation helpful? Give feedback.
-
did u manage to get the migration error solved eventually? I'm in the same situation. Next app is fine, but migration does not work. |
Beta Was this translation helpful? Give feedback.
-
I was able to get this to work by just installing the
|
Beta Was this translation helpful? Give feedback.
-
Same situation with "drizzle-kit generate"... - drizzle-orm/neon-http/migrator solves the problem. File:
then run TypeScript Execute (tsx): The easiest way to run TypeScript in Node.js ( https://www.npmjs.com/package/tsx ) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi,
I come from a 'serverfull' background and was surprised how hard it seems to get this working:
I want to develop locally with a docker run postgres instance, and run vercel-postgres in production.
I tried to adapt the example here: https://github.com/vercel/examples/tree/main/storage/postgres-drizzle
But this example is already outdated and doesn't use dirzzle-kit to generate migrations, when I started to add everything I was running into outdated syntax and once I updated all packages the site was 'bricked'.
Then I used this example: https://github.com/vercel/examples/tree/main/storage/postgres-pgvector
This one has at least a
drizzle.config.ts
is usingdrizzle-kit
and isn't outdated. Once I've added the possibility to run a postgres instance locally I ran into:#50177
Then I found this example which adds the Neon proxy: https://github.com/vvo/local-vercel-postgres-development
And I adapted it like this:
src/db.ts
drizzle.config.ts
Running
npx drizzle-kit generate --name=init
Generated the correct migration scripts.
But running
npx drizzle-kit migrate
results inIt would be great if there would be a full working starter kit that facilitates a professional level environment that just works. I'm coming originally from the python world and the amount of complexity for this simple task seems unreasonable, as @vvo learned vercel/storage#123 (comment) here.
Maybe we can use this discussion to build a bullet proof starter. I'm unsure how far I am, maybe it's 95% done ...
Additional information
Beta Was this translation helpful? Give feedback.
All reactions