[openstack-dev] [all][tc] SQL Schema Downgrades and Related Issues

Boris Bobrov bbobrov at mirantis.com
Thu Jan 29 22:01:00 UTC 2015


On Thursday 29 January 2015 22:06:25 Morgan Fainberg wrote:
> I’d like to propose we stop setting the expectation that a downwards
> migration is a “good idea” or even something we should really support.
> Offering upwards-only migrations would also simplify the migrations in
> general. This downward migration path is also somewhat broken by the
> migration collapses performed in a number of projects (to limit the number
> of migrations that need to be updated when we change a key component such
> as oslo.db or SQL-Alchemy Migrate to Alembic).
> 
> Are downward migrations really a good idea for us to support? Is this
> downward migration path a sane expectation? In the real world, would any
> one really trust the data after migrating downwards?

Frankly, I don't see a case when a downgrade from n to (n - 1) in development 
cannot be replaced with a set of fixtures and upgrade from 0 to (n - 1).

If we assume that upgrade can possible break something in production, we 
should not rely on fixing by downgrading the schema, because a) the code 
depends on the latest schema and b) "break" can be different and unrecoverable.

IMO downward migrations should be disabled. We could make a survey though, 
maybe someone has a story of using them in the fields.

-- 
С наилучшими пожеланиями,
Boris



More information about the OpenStack-dev mailing list