In Murano project, declarative models is out of sync with changes scripted in migrations.
For example:
1) Migration 004 amends field "package.description"
from VARCHAR(512) to TEXT [3]. At the same time model declaration still
reference "description" field as VARCHAR(512) [4].
[3] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/migration/alembic_migrations/versions/004_change_package_desc_type.py;h=9e46282e8c695c3b3147304e31076731a5bdf358;hb=HEAD#l65
[4] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/models.py;h=e176b2acca516365fc243e9813e76eb5638ebd83;hb=HEAD#l223
2) Alembic has capabilities to find out differences between
models and actual DB structure.
And it shows that such differences are exist:
- Checkout Murano
- Configure it to use MySQL
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf upgrade
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf revision --autogenerate
- Check out the new migration in "/murano/db/migration/alembic_migrations/versions".
It refects differences between models and DB.
Revision: 987e897937ddf534770afa4ebfe7dfeeed6d8ade
Project: murano
Do we agreed to replace current migrations so this bug will be obsolete after that?