[Buildbot] #2590: Use Alembic instead of SQLAlchemy-Migrate
Buildbot trac
trac at buildbot.net
Sun Oct 26 21:00:07 UTC 2014
#2590: Use Alembic instead of SQLAlchemy-Migrate
-------------------------+--------------------
Reporter: dustin | Owner:
Type: project-idea | Status: new
Priority: major | Milestone: 0.9.+
Version: | Resolution:
Keywords: database |
-------------------------+--------------------
Comment (by dustin):
Alembic is a new Python dependency, and can be installed anywhere Buildbot
can -- so the new dependency isn't an issue.
I'd like to rewrite all of the existing migration scripts, with some glue
in place to translate migrate versions (integers) into alembic versions.
Regarding autogeneration and SQL statements -- one of the things I *do*
like about sqlalchemy-migrate is that it moneypatches SQLAlchemy to
support common operations like adding and removing columns. I don't want
to get to the point of writing raw SQL strings -- we have SQLAlchemy to do
that kind of work for us -- but we'll need some functionality beyond what
SQLAlchemy provides.
The `buildbot upgrade-master` command allows users to *explicitly* upgrade
their master. Imagine the mayhem if someone accidentally started a newer
version of Buildbot in a staging environment, but with the production
database credentials, and it automatically upgraded the database. That
would certainly cause downtime as all of the un-upgraded production
masters were suddenly using a newer database. It might also mean data
loss.
So, the upgrade-master command is a way to ensure that users are explicit
about when database upgrades are performed.
Regarding "users lose data", I meant that a *broken* migration can easily
lose data -- so testing will be important, as you said.
--
Ticket URL: <http://trac.buildbot.net/ticket/2590#comment:6>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the bugs
mailing list