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

Ruslan Kamaldinov rkamaldinov at mirantis.com
Fri Jan 23 20:39:27 UTC 2015

On Fri, Jan 23, 2015 at 9:04 PM, Andrew Pashkin <apashkin at mirantis.com> wrote:
> Hello!
> Current situation with SQLite support:
> - Migration tests does not run on SQLIte.
> - At the same time migrations themselves support SQLite (with bugs).
> Today I came across this bug:
> Error during execution of database downgrade
> We can resolve this bug by hardening SQLite support, in that case:
> - We need to fix migrations and make them support SQLite without bugs, and
> then continuously make some effort to maintain this support (manually
> writing migrations and test cases for them).
> - Also need to introduce migration tests run on SQLite.
> We also can drop SQLite support and in this case:
> - We just factor out all that related to SQLite from migrations one time and
> set this bug as "Won't fix".
> Let's discuss that.

I agree that we don't need to support SQLite in migrations. As it was
already said in [1], there is no point in running DB migrations
against SQLite.

Here is what I suggest to do:
1. Use ModelsMigrationsSync from [2] in tests to make sure that
SQLAlchemy models are in sync with migrations. Usage example can be
found at [3]
2. Populate DB schema from SQLAlchemy models in unit-tests which
require access to DB
3. Wipe out everything related to SQLite from DB migrations code
4. Recommend all developers to use MySQL when they run Murano locally
5. For those who still insist on SQLite we can provide a command line
option which would generate database schema from SQLAlchemy metadata.
This should be declared as development only feature, not supported for
any kind of production deployments

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-January/055058.html
[2] http://git.openstack.org/cgit/openstack/oslo.db/tree/oslo_db/sqlalchemy/test_migrations.py
[3] http://git.openstack.org/cgit/openstack/sahara/tree/sahara/tests/unit/db/migration/test_migrations_base.py#n198


More information about the OpenStack-dev mailing list