[openstack-dev] About fixing old DB migrations
ndipanov at redhat.com
Thu Jul 18 09:54:48 UTC 2013
On 18/07/13 11:34, Boris Pavlovic wrote:
> Hi all,
> I have some question about fixing old DB migrations.
> If we are now in havana. And some broken migration was added in Havana.
> Why we are not able to fix it directly?
> Instead of chaining few lines, we should add new migration that do some
> For example in this migration
> We have add unique constraint with wrong name, And it won't work
> properly in psql and mysql.
> Because of "strange" rule don't touch old migrations in any case we have
> to write one more migration:
> https://review.openstack.org/#/c/37251/ that recreate this unique
> constraint with correct name.
> Probably we should rethink this rule?
Rule is because (I believe at least) - in the spirit of continuous
integration - people should be able to deploy continuously anything on
Due to the nature of schema versioning as done by sqlalchemy-migrate -
changing a migration would leave people doing continuous deployments,
with broken code (or db state - depends how you look at it) as they will
not be able to re-run the migration.
This has to stay like that as long as we are using sqla-migrate I believe.
> Best regards,
> Boris Pavlovic
> Mirantis Inc.
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
More information about the OpenStack-dev