uber
Explore posts from serversDTDrizzle Team
•Created by uber on 1/10/2025 in #help
🚨 Issue: Testing with PostgreSQL and Drizzle ORM using Testcontainers
Yeah i was just lookin at this, i kinda like the idea of override the import, thats what i need (I think)
7 replies
DTDrizzle Team
•Created by uber on 1/10/2025 in #help
🚨 Issue: Testing with PostgreSQL and Drizzle ORM using Testcontainers
EDIT EDIT EDIT:
i now have this but i dont rly like it:
tests
7 replies
DTDrizzle Team
•Created by uber on 1/10/2025 in #help
🚨 Issue: Testing with PostgreSQL and Drizzle ORM using Testcontainers
const container = await new PostgreSqlContainer().start();
would have to move from my test files and would go in my global db handler file to be used as db instance if NODE_ENV
is test
?
Is that a clean approach7 replies
DTDrizzle Team
•Created by uber on 1/10/2025 in #help
🚨 Issue: Testing with PostgreSQL and Drizzle ORM using Testcontainers
If no, what is a good simple approach.
If yes how would i differenciate between dev/prod vs test? envs .. NODE_ENV?
7 replies
DTDrizzle Team
•Created by uber on 1/10/2025 in #help
🚨 Issue: Testing with PostgreSQL and Drizzle ORM using Testcontainers
I dont want to have to pass a db instance to my methods..
that leads me to handle the global instance to return the proper db instance based on the use case:
In my global db instance i would either return my dev/prod db instance but if test return the testcontainers postgres db instance ?
Is this the right approach?
7 replies
DTDrizzle Team
•Created by uber on 10/29/2024 in #help
Evolving form data and typesafety .
Cant find anybody having my issue so I must be doing something wrong or thinking about if the wrong way.
The only way i came up with is adding versioning to my schemas (in my codebase) everytime my schema changes but then my code will become messy real quick
2 replies