W
Wasp•5mo ago
Zuck

*/migrations should not be in .gitignore right?

Just noticed */migrations is in my gitignore and im pretty sure WASP auto put it there. That shouldnt be there right?
3 Replies
kapa.ai
kapa.ai•5mo ago
Hi @Zuck. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Yes, you are correct. The migrations/ directory should not be in your .gitignore file. This directory contains database migration files which are crucial for the correct operation of your application, especially when working in a team or deploying to production. These files ensure that everyone working on the project, or any environment where the project runs, has the same database structure. In Wasp, when you make changes to your data model, new migration files are created in the migrations/ directory. These files describe the changes to be made to the database structure. When you run wasp db migrate-dev, these migrations are applied to your database. If you have accidentally deleted your migrations/ directory, you can recreate your migrations by running wasp db migrate-dev. However, be aware that this will create a new initial migration based on the current state of your data model, and any previous migration history will be lost. If you are switching from SQLite to PostgreSQL for production, you would need to delete the old migrations since they are SQLite migrations and can't be used with PostgreSQL. After setting up your new PostgreSQL database, you can run wasp db migrate-dev to create a new initial migration for PostgreSQL. Sources: - Github Issue (closed): Propagate deletion of db migrations from Wasp src to the generated project (https://github.com/wasp-lang/wasp/issues/211) - Docs > Data-model > Databases > Supported Database Backends > Migrating from SQLite to PostgreSQL (https://wasp-lang.dev/docs/data-model/backends#migrating-from-sqlite-to-postgresql) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Zuck, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
martinsos
martinsos•5mo ago
No it shouldn't! It seems we had that as a mistake in the older version of OpenSaas. The newest one (released last week) should have that fixed.
Zuck
ZuckOP•5mo ago
Cool all good!! Removed it! Thank ya! 🙂
Want results from more Discord servers?
Add your server