Closed anthony2261 closed 1 month ago
Add a contribution guide to the repository
CONTRIBUTING.md
file with instructions for contributing to the project.backend/README.md
to include a section on Alembic migrations with the same reminder for PRAGMA FK commands.@RamiAwar would be good to include why the Pragma command was removed and more importantly what to lookout for if the contributor decides to add pragma fk on: the potential loss of data
We should also include it in the PR description here (not just in the readme).
At this point SQLite needs it's own readme of gotchas lol. Maybe we link those articles somewhere. It's really a lot of headaches but the portability is worth it...
@RamiAwar Initial migration should not be affected because it's just creating tables and not data. The role of the pragma command is to enforce FK validation, not creating or removing constraints. I.E. if we have a table with a column that foreign keys to another table, this will always be the case regardless of the pragma FK status. The difference is that if the pragma is off, we are able to create an entry with a non-existing FK and sqlite will not throw an error, but if pragma is on we will get an error