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]
Mike Bayer [Tue, 29 Nov 2011 21:09:13 +0000 (16:09 -0500)]
- implement "start migrations" event for impls
- implement counter logic for SQL server constraint/default
drop so that variables are declared uniquely within
a full migration run, #12
Mike Bayer [Tue, 29 Nov 2011 20:50:35 +0000 (15:50 -0500)]
- add begin_transaction() env.py helper. Emits the appropriate
begin/commit pair regardless of context.
- add dialect support for BEGIN/COMMIT working corresponding
to backend. Add implementation for SQL server.
- add tests for BEGIN/COMMIT , #11
- rework SQL server test suite for more classes of test
- fix test suite to clean up after a prior failed suite
Mike Bayer [Tue, 29 Nov 2011 03:29:43 +0000 (22:29 -0500)]
- add version check for at least 06, tests for 07 in selected
areas
- add "requires 07" decorators to test suite
- add tests for PG ENUM in offline mode. works in conjunction
with the latest 0.7.4 tip of SQLAlchemy, fixes #9. Docs will
be needed to illustrate how ENUM should be used.
- add support for table before_create and after_create events
within op.create_table(). Currently this will do the ENUM
thing for PG but will also invoke any other kinds of events
that might get configured on the table.
Mike Bayer [Mon, 28 Nov 2011 18:49:58 +0000 (13:49 -0500)]
- move comparison of types, server default to the context.
PG context in particular does some tricks to help these.
- But since type/default comparison is still loaded with surprises,
particularly the MySQL/MSSQL TINYINT/BIT-> boolean thing which we
can work around but haven't yet, turn both off by default. They
aren't super useful compared to the huge number of wrong results
they can currently emit.
- Also add a plugin system for type/server default comparison.
- everything works but we're coding way ahead of tests at this
point
Mike Bayer [Mon, 28 Nov 2011 07:24:18 +0000 (02:24 -0500)]
- rework MySQL + autogenerate so that
multiple changes to a single col are collapsed
into one step, will work for other dialects
which may support this too
- add support for "imports" in scripts so
that dialect-specific types can be rendered straight in
from their parent module and work immediately
- rework the internals of autogenerate to be more
succinct, though there's a lot more that could
happen here to make this easier
Mike Bayer [Thu, 24 Nov 2011 00:27:58 +0000 (19:27 -0500)]
- support the constraints generated from SchemaType, honoring conditional
rule
- add mssql_drop_default, mssql_drop_check flags to drop_column(),
will emit special MSSQL crap to drop DEFAULT and CHECK constraints based
on inline system table lookup