Migration failure on fresh DB
I'm currently experiencing a migration failure on a fresh Postgres DB with both postgres.js and node-postgres. It's complaining that an enum I have defined in my schema (which should have created already as it's in the generated migration) does not exist.
6 Replies
Best to post your generated migration and the relevant schema file
Make sure you export all entities in schema file before running the migration
Enums should also be exported
Yep, everything is exported.
Yeah, that’s a bug. Will fix it
2 workarounds for now
1. Change 1 param in pgEnum to “grand_company”
2. Add double quotes to
grandCompany
in sql file. Do it before applying to database
First should be better if you fine with snake case naming on database side
You using latest drizzle kit version?Awesome, thanks!
Yeah, I have drizzle kit 0.17.6 at the moment.
Thanks!