[openstack-dev] [nova][heat] sqlalchemy-migrate tool to alembic
Mike Bayer
mbayer at redhat.com
Fri May 15 01:54:27 UTC 2015
On 5/14/15 7:12 PM, Angus Salkeld wrote:
>
>
> On Fri, May 15, 2015 at 4:46 AM, Mike Bayer <mbayer at redhat.com
> <mailto:mbayer at redhat.com>> wrote:
>
>
>
> On 5/14/15 11:58 AM, Doug Hellmann wrote:
>
>
> At one point we were exploring having both sqlalchemy-migrate and
> alembic run, one after the other, so that we only need to
> create new
> migrations with alembic and do not need to change any of the
> existing
> migrations. Was that idea dropped?
>
>
> to my knowledge the idea wasn't dropped. If a project wants to
> implement that using the oslo.db system, that is fine, however
> from my POV I'd prefer to just port the SQLA-migrate files over
> and drop the migrate dependency altogether. Whether or not a
> project does the "run both" step as an interim step doesn't affect
> that effort very much.
>
>
> Hi Mike
>
> Just a quick question: How would the alembic scripts know where to
> start the migration from if the current installation had been up until
> that
> point been using migrate (I believe both alembic and migrate write to
> a small table what the current version is, would you look for that?)?
Thinking about that issue, the most controllable and clean-break way to
do it would be to add support to Alembic itself that augments its own
handling of the "alembic_version" table to transfer data from an
existing sqlalchemy_migrate table. I can even see using traditional
alembic hex-style version numbers in migration files which then also can
refer to their previous numerically-based migrate file.
It's not unreasonable that Alembic would support some standard upgrade
path from Migrate, the only other migration tool SQLAlchemy has ever
had, so I'd just add that as a feature.
>
> -Angus
>
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe:
> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> <http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe>
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150514/97287f30/attachment.html>
More information about the OpenStack-dev
mailing list