anitab-org / anitab-org/bridge-in-tech-backend

Feat: Utilise flask-migrate to support SQLAlchemy migration using alembic

Đang mở
#211 10 bình luận 0 reaction 1 người được giao Được @decon-harsh nhận Xem trên GitHub
Category: Coding Type: Maintenance
Ngôn ngữ chính
Python
Star
24
Fork
80
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.