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 > magic. > > For example in this migration > https://review.openstack.org/#/c/33127/19 > > 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? >
Heya, Rule is because (I believe at least) - in the spirit of continuous integration - people should be able to deploy continuously anything on master. 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. N. > > Best regards, > Boris Pavlovic > > Mirantis Inc. > > > > _______________________________________________ > OpenStack-dev mailing list > [email protected] > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > _______________________________________________ OpenStack-dev mailing list [email protected] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
