📝 Add migrations section
I added the migrations section to use SQLModel with alembic.
- [X] Initial example
- [X] Step by step
- [X] Example codes
Updated release from: https://github.com/fastapi/sqlmodel/pull/512
📝 Docs preview for commit 23a6b352ef8042a434d871ee42dc67cf918dd26c at: https://eae99712.sqlmodel.pages.dev
Modified Pages
- https://eae99712.sqlmodel.pages.dev/advanced/migrations/ - (before)
- https://eae99712.sqlmodel.pages.dev/img/advanced/migrations/migrations001.png - (before)
- https://eae99712.sqlmodel.pages.dev/img/advanced/migrations/migrations002.png - (before)
- https://eae99712.sqlmodel.pages.dev/img/advanced/migrations/migrations003.png - (before)
📝 Docs preview for commit 5cb04c1ed74af515bafd22bfdfee507679bf0e57 at: https://0bdff723.sqlmodel.pages.dev
Modified Pages
- https://0bdff723.sqlmodel.pages.dev/advanced/migrations/ - (before)
- https://0bdff723.sqlmodel.pages.dev/img/advanced/migrations/migrations001.png - (before)
- https://0bdff723.sqlmodel.pages.dev/img/advanced/migrations/migrations002.png - (before)
- https://0bdff723.sqlmodel.pages.dev/img/advanced/migrations/migrations003.png - (before)
📝 Docs preview for commit 9b58d73ac67c22272543ad248dc51839ea6590b5 at: https://5ae74634.sqlmodel.pages.dev
Modified Pages
- https://5ae74634.sqlmodel.pages.dev/advanced/migrations/ - (before)
- https://5ae74634.sqlmodel.pages.dev/img/advanced/migrations/migrations001.png - (before)
- https://5ae74634.sqlmodel.pages.dev/img/advanced/migrations/migrations002.png - (before)
- https://5ae74634.sqlmodel.pages.dev/img/advanced/migrations/migrations003.png - (before)
📝 Docs preview for commit 2258c98c61cac9bbe25c4e2a487618496bd3c0d3 at: https://00e5a54e.sqlmodel.pages.dev
Modified Pages
- https://00e5a54e.sqlmodel.pages.dev/advanced/migrations/ - (before)
- https://00e5a54e.sqlmodel.pages.dev/img/advanced/migrations/migrations001.png - (before)
- https://00e5a54e.sqlmodel.pages.dev/img/advanced/migrations/migrations002.png - (before)
- https://00e5a54e.sqlmodel.pages.dev/img/advanced/migrations/migrations003.png - (before)
Just as a maintenance note, https://github.com/fastapi/sqlmodel/pull/689 is a related PR.
this is great, no external dependency required, should be able to merged to doc site
@ezeparziale, thanks for your interest!
It's mentioned in the roadmap, that there is a plan to implement "Integrated migrations (using Alembic)". As I understand, the idea is not just use alembic directly, but implement a simpler interface for migrations.
#689 "Integrates" migrations into sqlmodel command, but, IMO, the configuration process can still be simplified more.
It has been nearly two years since the roadmap proposed the integrated migration plan. Could we temporarily provide documentation on using Alembic for migration in the meantime?
@YuriiMotov I understand that SQLModel will have it own "way" of doing a migration, but in the means time, it not harm for adding simple instruction to use Alembic with SQLModel in the doc. There is no code change in the core module.