Alembic 0.4.0 Released

56 views
Skip to first unread message

Michael Bayer

unread,
Oct 1, 2012, 8:27:47 PM10/1/12
to sqlalchem...@googlegroups.com, sqlal...@googlegroups.com, sqlalche...@googlegroups.com
Alembic 0.4.0 is now available. Alembic is the migrations tool for SQLAlchemy, including such features as minimalist script construction, autogeneration of candidate migrations, and offline script generation.

Included in this release is a *big* change by Bruno Binet that adds full blown "schema" support to all migration operations, including autogenerate. This was a great effort on his part and I'm glad to have it in the release. Also thanks to Bryce Lohr for fixes to the "multidb" template which had fallen into disrepair, and Moriyoshi Koizumi for some nicely done MySQL related fixes.

Alembic is available for download up on the cheeseshop at http://pypi.python.org/pypi/alembic/



0.4.0
=====
- [feature] Support for tables in alternate schemas
has been added fully to all operations, as well as to
the autogenerate feature. When using autogenerate,
specifying the flag include_schemas=True to
Environment.configure() will also cause autogenerate
to scan all schemas located by Inspector.get_schema_names(),
which is supported by *some* (but not all)
SQLAlchemy dialects including Postgresql.
*Enormous* thanks to Bruno Binet for a huge effort
in implementing as well as writing tests. #33.

- [feature] The command line runner has been organized
into a reusable CommandLine object, so that other
front-ends can re-use the argument parsing built
in. #70

- [feature] Added "stdout" option to Config, provides
control over where the "print" output of commands like
"history", "init", "current" etc. are sent. #43

- [bug] Fixed the "multidb" template which was badly out
of date. It now generates revision files using
the configuration to determine the different
upgrade_<xyz>() methods needed as well, instead of
needing to hardcode these. Huge thanks to
BryceLohr for doing the heavy lifting here. #71

- [bug] Fixed the regexp that was checking for .py files
in the version directory to allow any .py file through.
Previously it was doing some kind of defensive checking,
probably from some early notions of how this directory
works, that was prohibiting various filename patterns
such as those which begin with numbers. #72

- [bug] Fixed MySQL rendering for server_default which
didn't work if the server_default was a generated
SQL expression. Courtesy Moriyoshi Koizumi.

- [feature] Added support for alteration of MySQL
columns that have AUTO_INCREMENT, as well as enabling
this flag. Courtesy Moriyoshi Koizumi.

limodou

unread,
Oct 1, 2012, 8:32:21 PM10/1/12
to sqlal...@googlegroups.com
Thanks a lot, alembic is very useful for me. 

--
I like python!
UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
UliWeb <<simple web framework>>: https://github.com/limodou/uliweb
My Blog: http://my.oschina.net/limodou

junepeach

unread,
Oct 23, 2012, 5:18:40 PM10/23/12
to sqlal...@googlegroups.com, sqlalchem...@googlegroups.com, sqlalche...@googlegroups.com
Alembic is cool :)
How does AUTO_INCREMENT work for the below situation in MySQL:
auto_increment = 10, or any integer which is not 1 (default value)?
 
Thanks,
 
Junepeach

Michael Bayer

unread,
Oct 23, 2012, 5:38:47 PM10/23/12
to sqlal...@googlegroups.com
that might not be supported yet.  it just emits AUTO_INCREMENT for now.   

Looking at MySQL's docs it seems like you should just emit an ALTER for that explicitly:

op.execute("ALTER TABLE tbl AUTO_INCREMENT = 100")



--
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/mDj9a-f_1i4J.
To post to this group, send email to sqlal...@googlegroups.com.
To unsubscribe from this group, send email to sqlalchemy+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.

junepeach

unread,
Oct 24, 2012, 9:26:30 AM10/24/12
to sqlal...@googlegroups.com
Thank you very much, Michael. It is exactly what I need.
Reply all
Reply to author
Forward
0 new messages