[openstack-dev] [keystone] sqlite doesn't support migrations
mordred at inaugust.com
Fri Jul 12 20:19:58 UTC 2013
On 07/11/2013 01:12 PM, Dolph Mathews wrote:
> Just as a general statement, outside the scope of openstack, I don't
> think sqlite is intended to support schema evolution. From the sqlite
> docs : "SQLite supports a limited subset of ALTER TABLE. [...] It is
> not possible to rename a column, remove a column, or add or remove
> constraints from a table."
> We've been through hell trying to support migrations on sqlite, because
> we test against sqlite, and because we test our migrations... on sqlite.
> So, we've already shot ourselves in the foot. We're clearly moving
> towards gating against mysql + postgresql, so in the mean time, let's
> limit the amount of effort we put into further support sqlite migrations
> until we can safely rip it out altogether.
> : http://www.sqlite.org/lang_altertable.html
I agree. The reason to use sqlite in unitests and stuff is because it's
easy and doesn't require users and system things and everything. If
we're spending extra effort to maintain the simple thing, then it's
probably not a simple thing.
As an aside, (ignore the fact that I'm a former Drizzle core dev) it
might be worthwhile taking 30 minutes one day and exploring a drizzle
database test fixture. One of the things we did in drizzle was make it
not need any bootstrapping and to work sanely with no config files ...
so launching a drizzle on a spare port, running database tests against
it and then deleting it should actually be super simple - and at the
worst no harder than doing what glance does in their functional tests.
More information about the OpenStack-dev