How to use different tables for production and development environments? #2260
Unanswered
alexiuscrow
asked this question in
Q&A
Replies: 1 comment
-
maybe you should take a different database for prod mode |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using Drizzle ORM with Next.js + Vercel.
Currently, I am on Vercel's free plan and I only have access to a single Postgres database. However, I need to separate my development and production environments.
How I can use different tables for development and production within the same database using Drizzle ORM?
I have tried using
pgTableCreator
to create tables with an environment prefix.But when I want to create tables for production with the same schema that I am already using for development, Drizzle ORM first asks if I want to create new ones or rename existing tables.
And when I choose "create table", Drizzle ORM wants to delete the development env tables.
...or maybe there is a way to avoid deleting the dev tables at the last step and create tables with new names (with the
prod
prefix in my case)?Please advice.
Beta Was this translation helpful? Give feedback.
All reactions