anitab-org / anitab-org/bridge-in-tech-backend
Feat: Utilise flask-migrate to support SQLAlchemy migration using alembic
- Langage dominant
- Python
- Étoiles
- 24
- Forks
- 80
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
### Is your feature request related to a problem? Please describe.
At the moment BIT backend doesn't have db migration management. This will cause issue in case we have to alter the database schemas.
### Describe the solution you'd like
Utilise flask-migrate to handle SQLalchemy schemas migration using Alembic.
### Describe alternatives you've considered
To simplify migration script, bit and ms schema can be integrated as one schema. This is only possible when the idea proposed on [zulip](https://anitab-org.zulipchat.com/#narrow/stream/222534-mentorship-system/topic/BridgeInTech.20-.20Mentorship.20System.20full.20backend.20integration/near/232199162) discussion is approved (to fully integrate BIT backend into MS backend).
### Additional context
The migration script/s should be able to handle the multiple schemas accordingly.
I have attempted this before using the following files (while the initial migration was successfully created, there's still work to be done like sorting out how to read the changes made to bit_schema)
* [alembic.ini](https://gist.github.com/mtreacy002/1aa0dc215e91f9a8cc34ce410764f8cf)
* [scrip.py.mako](https://gist.github.com/mtreacy002/a8c39d876572695f82dc4174267ef887)
* [env.py](https://gist.github.com/mtreacy002/f9cb49528566671ef2b3ce56cb48dec2)
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.