[openstack-dev] [Murano] SQLite support - drop or not?

Andrew Pashkin apashkin at mirantis.com
Fri Jan 30 11:30:04 UTC 2015

Working on this issue I encountered another problem.

Most indices in the project has no names and because of that,
developer must reverse-engineer them in every migration.
Read about that also here [1].

SQLAlchemy and Alembic provide feature for generation constraint
names by pattern, specifically to resolve that kind of issues [1].

I decided to introduce usage of this feature in Murano.

I've implemented solution that preserves backward-compatibility
for migration and allows to rename all constraints according
to patterns safely [2]. With it user, that have already deployed Murano
will be able to upgrade to new version of Murano without issues.

There are downsides in this solution:
- It assumes that all versions of Postgres and MySQL uses the
  same patterns for constraints names generation.
- It is hard to implement a test for this solution and it will be slow.
  Because there is need to reproduce such situation when user has old
  versions of migrations applied, and then tries to upgrade.

Another possible solution is to drop all current migrations and
introduce new one with correct names.
This brings us to new problem - migrations and models are out of sync
right now in multiple places - there are different field types in
migrations and models, migrations introduces indices that is absent
in models, etc.

And this solution has great downside - it is not backward-compatible,
so all old users will lost their data.

We (Murano team) should decide, what solution we want to use.

[2] https://review.openstack.org/150818

With kind regards, Andrew Pashkin.
cell phone - +7 (985) 898 57 59
Skype - waves_in_fluids
e-mail - apashkin at mirantis.com

More information about the OpenStack-dev mailing list