Kacper Hemperek
DTDrizzle Team
•Created by VitorAndrey on 2/8/2024 in #help
Migration Error after building with Electron
You should edit main part of that most likely
https://electron-vite.org/guide/#configuring-electron-vite
9 replies
DTDrizzle Team
•Created by VitorAndrey on 2/8/2024 in #help
Migration Error after building with Electron
They use vite instead of webpack not sure how to accomplish the same thing there but I bet you should look if you even have migration folder inside dist file and if not adjust vite config to clone. When you have that working my sollution should work just fine
9 replies
DTDrizzle Team
•Created by VitorAndrey on 2/8/2024 in #help
Migration Error after building with Electron
Ok so here is what I did
1. Changed place where migrations are stored from earlier
Now my dist folder looks like this
2. I changed my
drizzle.config.ts
to be relative to path depending if im in production environment (not sure if that does anything tbh but did it just in case)
3. I modified my database setup function to get path to migration directory using __dirname
like this
After i created path to migrations folder with __dirname
it started working just fine
Hope this helps, if you have any other questions let me know9 replies
DTDrizzle Team
•Created by VitorAndrey on 2/8/2024 in #help
Migration Error after building with Electron
Hey, I encountered exactly same problem, I'm building my main process with webpack and added this this webpack config that builds for prod
even when I did that drizzle still can't find migration folder and I think thats because file path that I setup in drizzle.confg.ts is not coresponding with right folder after I build the app any idea what could i change?
9 replies