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
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.
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]
Mike Bayer [Thu, 26 Jan 2012 20:43:57 +0000 (15:43 -0500)]
turn alembic.op and alembic.context into real proxy modules,
with an accurate system of reflecting the Operations and
EnvironmentContext methods into them.
Mike Bayer [Thu, 26 Jan 2012 15:21:25 +0000 (10:21 -0500)]
- [bug] env.py templates call
connection.close() to better support
programmatic usage of commands; use
NullPool in conjunction with create_engine()
as well so that no connection resources
remain afterwards. [#25]
Mike Bayer [Tue, 24 Jan 2012 23:10:34 +0000 (18:10 -0500)]
- tried it out in my work project, and realized the "op" and "context" namespaces
need to be there fully and in particular "context" needs to be
a proxy object, as env.py may have dependencies which live beyond the
scope of the migration script. Will have to try to make
these proxies as straightforward as possible.
- more architecture docs
Mike Bayer [Tue, 24 Jan 2012 20:25:28 +0000 (15:25 -0500)]
- [feature] The naming of revision files can
now be customized to be some combination
of "rev id" and "slug", the latter of which
is based on the revision message.
By default, the pattern "<rev>_<slug>"
is used for new files. New script files
should include the "revision" variable
for this to work, which is part of
the newer script.py.mako scripts.
[#24]
EnvironmentContext sets up the variables "alembic.context"
and "alembic.op" to act like the modules they used to.
MigrationContext can also exist independently of EnvironmentContext.
Mike Bayer [Fri, 20 Jan 2012 21:23:20 +0000 (16:23 -0500)]
- [feature] Can create alembic.config.Config
with no filename, use set_main_option()
to add values. Also added set_section_option()
which will add sections. [#23]