Mike Bayer [Sun, 30 Sep 2012 17:09:30 +0000 (13:09 -0400)]
- [feature] Added "stdout" option to Config, provides
control over where the "print" output of commands like
"history", "init", "current" etc. are sent. #43
Mike Bayer [Sun, 30 Sep 2012 16:57:29 +0000 (12:57 -0400)]
- [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
Mike Bayer [Sun, 30 Sep 2012 16:37:02 +0000 (12:37 -0400)]
- [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
Mike Bayer [Sun, 30 Sep 2012 16:24:43 +0000 (12:24 -0400)]
- call it 0.4.0
- [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
Mike Bayer [Wed, 15 Aug 2012 19:33:52 +0000 (15:33 -0400)]
- [feature] Added include_symbol option to
EnvironmentContext.configure(),
specifies a callable which will include/exclude tables
in their entirety from the autogeneration process
based on name. #27
Mike Bayer [Wed, 8 Aug 2012 15:12:04 +0000 (11:12 -0400)]
- [bug] Improved error message when specifiying
non-ordered revision identifiers to cover
the case when the "higher" rev is None,
improved message overall. #66
Mike Bayer [Sat, 28 Jul 2012 11:26:13 +0000 (07:26 -0400)]
- [bug] Fixes made to the constraints created/dropped
alongside so-called "schema" types such as
Boolean and Enum. The create/drop constraint logic
does not kick in when using a dialect that doesn't
use constraints for these types, such as postgresql,
even when existing_type is specified to
alter_column(). Additionally, the constraints
are not affected if existing_type is passed but
type_ is not, i.e. there's no net change
in type. #62
Mike Bayer [Sat, 28 Jul 2012 10:29:26 +0000 (06:29 -0400)]
- [feature] Added --sql argument to the "revision" command,
for the use case where the "revision_environment"
config option is being used but SQL access isn't
desired.
Mike Bayer [Sun, 8 Jul 2012 18:10:39 +0000 (14:10 -0400)]
- [bug] Fixed issue whereby when autogenerate would
render create_table() on the upgrade side for a
table that has a Boolean type, an unnecessary
CheckConstraint() would be generated. #58
- [feature] Implemented SQL rendering for
CheckConstraint() within autogenerate upgrade,
including for literal SQL as well as SQL Expression
Language expressions.
Mike Bayer [Sat, 2 Jun 2012 18:42:09 +0000 (14:42 -0400)]
- [feature] New config argument
"revision_environment=true", causes env.py to
be run unconditionally when the "revision" command
is run, to support script.py.mako templates with
dependencies on custom "template_args".
- [feature] Added "template_args" option to configure()
so that an env.py can add additional arguments
to the template context when running the
"revision" command. This requires either --autogenerate
or the configuration directive "revision_environment=true".
Mike Bayer [Sun, 20 May 2012 13:51:28 +0000 (09:51 -0400)]
- [bug] Fixed bug whereby directories inside of
the template directories, such as __pycache__
on Pypy, would mistakenly be interpreted as
files which are part of the template. #49
Mike Bayer [Wed, 16 May 2012 16:16:34 +0000 (12:16 -0400)]
- [feature] Added support for "relative" migration
identifiers, i.e. "alembic upgrade +2",
"alembic downgrade -1". Courtesy
Atsushi Odagiri for this feature.
Mike Bayer [Tue, 1 May 2012 15:19:54 +0000 (11:19 -0400)]
- [bug] Added "type" argument to op.drop_constraint(),
and implemented full constraint drop support for
MySQL. CHECK and undefined raise an error.
MySQL needs the constraint type
in order to emit a DROP CONSTRAINT. #44
Updated multidb env.py to use standard logger instead of direct stderr output and added some progress messages indicating which database is being migrated.
Updated the 'revision' command to pass the current Alembic config to the script templates, so it could use it to generate blocks based on current config. Useful for multidb configurations, where you want each database accounted for in the migrations.
Mike Bayer [Thu, 26 Apr 2012 22:07:06 +0000 (18:07 -0400)]
- [bug] Fixed bug whereby create_unique_constraint()
would include in the constraint columns that
are added to all Table objects using events,
externally to the generation of the constraint.
Fixed kwarg passed in to multidb version scripts to reflect that it's the name, not the engine object, that gets passed in. Fixed the downgrade side of the multidb env.py template.
Mike Bayer [Sat, 7 Apr 2012 22:00:42 +0000 (18:00 -0400)]
- [bug] bulk_insert() fixes:
1. bulk_insert() operation was
not working most likely since the 0.2 series
when used with an engine. #41
2. Repaired bulk_insert() to complete when
used against a lower-case-t table and executing
with only one set of parameters, working
around SQLAlchemy bug #2461 in this regard.
3. bulk_insert() uses "inline=True" so that phrases
like RETURNING and such don't get invoked for
single-row bulk inserts.
4. bulk_insert() will check that you're passing
a list of dictionaries in, raises TypeError
if not detected.
Mike Bayer [Thu, 5 Apr 2012 17:33:37 +0000 (13:33 -0400)]
- move to 0.3 as we are changing API
- [general] The focus of 0.3 is to clean up
and more fully document the public API of Alembic,
including better accessors on the MigrationContext
and ScriptDirectory objects. Methods that are
not considered to be public on these objects have
been underscored, and methods which should be public
have been cleaned up and documented, including:
Mike Bayer [Tue, 28 Feb 2012 16:27:04 +0000 (11:27 -0500)]
- [bug] Fixed inappropriate direct call to
util.err() and therefore sys.exit()
when Config failed to locate the
config file within library usage.
[#35]
Mike Bayer [Tue, 28 Feb 2012 16:21:07 +0000 (11:21 -0500)]
- [bug] implement 'tablename' parameter on
drop_index() as this is needed by some
backends.
- [feature] Added execution_options parameter
to op.execute(), will call execution_options()
on the Connection before executing.
The immediate use case here is to allow
access to the new no_parameters option
in SQLAlchemy 0.7.6, which allows
some DBAPIs (psycopg2, MySQLdb) to allow
percent signs straight through without
escaping, thus providing cross-compatible
operation with DBAPI execution and
static script generation.
Mike Bayer [Wed, 8 Feb 2012 05:30:14 +0000 (00:30 -0500)]
- [feature] script_location can be interpreted
by pkg_resources.resource_filename(), if
it is a non-absolute URI that contains
colons. This scheme is the same
one used by Pyramid. [#29]