Commit Graph

758 Commits

Author SHA1 Message Date
Mike Bayer b8c8dc581f 0.7.7 2015-07-22 13:25:37 -04:00
Mike Bayer dbcd7e6a19 - fix this name for the 0.7 branch 2015-07-22 12:53:56 -04:00
Mike Bayer 61183b7a96 - Fixed critical issue where a complex series of branches/merges would
bog down the iteration algorithm working over redundant nodes for
millions of cycles.   An internal adjustment has been
made so that duplicate nodes are skipped within this iteration.
fixes #310
2015-07-22 12:38:00 -04:00
Mike Bayer 849996a680 - Implemented support for :meth:`.BatchOperations.create_primary_key`
and :meth:`.BatchOperations.create_check_constraint`.
fixes #305
- table keyword arguments are copied from the original reflected table,
such as the "mysql_engine" keyword argument.
2015-07-03 17:36:27 -04:00
Mike Bayer 5ccc81701c - add a changelog for the legacy_schema_aliasing warning issue,
the fix was committed in 229f8672.
2015-06-26 18:09:50 -04:00
Mike Bayer a3f181a7a0 - add clarification that this tutorial is against the generic template 2015-06-17 14:54:34 -04:00
Mike Bayer 541cbd26b5 - The :meth:`.MigrationContext.stamp` method, added as part of the
versioning refactor in 0.7 as a more granular version of
:func:`.command.stamp`, now includes the "create the alembic_version
table if not present" step in the same way as the command version,
which was previously omitted.
fixes #300
2015-06-09 11:40:34 -04:00
Mike Bayer 229f86723b - turn on the mssql legacy_schema_aliasing flag to remove
warnings
2015-05-26 10:55:36 -04:00
Mike Bayer 29b301a7ec - Fixed bug where foreign key options including "onupdate",
"ondelete" would not render within the ``op.create_foreign_key()``
directive, even though they render within a full
``ForeignKeyConstraint`` directive.
fixes #298
2015-05-18 20:21:49 -04:00
Mike Bayer 87629c53ac - add test for FKC with multiple kwargs, reference #92 2015-05-18 19:48:09 -04:00
Mike Bayer 6ae4196acc 0.7.6 2015-05-05 17:02:26 -04:00
Mike Bayer 0ea37679dd Merged in jdanjou/alembic/jd/typo-doc-comparator (pull request #44)
Fix typo in autogenerate documentation
2015-05-04 12:57:13 -04:00
Julien Danjou 239cf80306 Fix typo in autogenerate documentation 2015-05-04 17:57:42 +02:00
Mike Bayer c75be37640 - Fixed bug where the case of multiple mergepoints that all
have the identical set of ancestor revisions would fail to be
upgradable, producing an assertion failure.   Merge points were
previously assumed to always require at least an UPDATE in
alembic_revision from one of the previous revs to the new one,
however in this case, if one of the mergepoints has already
been reached, the remaining mergepoints have no row to UPDATE therefore
they must do an INSERT of their target version.
fixes #297
2015-05-03 20:17:19 -04:00
Mike Bayer b35dbff602 - add tox targets for 3.4 2015-05-01 14:54:44 -04:00
Mike Bayer dabc7f0932 - Added support for type comparison functions to be not just per
environment, but also present on the custom types themselves, by
supplying a method ``compare_against_backend``.
Added a new documentation section :ref:`compare_types` describing
type comparison fully.
fixes #296
2015-04-30 11:33:58 -04:00
Mike Bayer a192c345fc Merged in rtaranu/alembic (pull request #43)
- fixed spelling mistake in docs
2015-04-21 13:04:50 -04:00
Raul Taranu 7f21db8618 - fixed spelling mistake in docs 2015-04-21 13:22:40 +00:00
Mike Bayer 0e1c098989 - Added a new option
:paramref:`.EnvironmentContext.configure.literal_binds`, which
will pass the ``literal_binds`` flag into the compilation of SQL
constructs when using "offline" mode.  This has the effect that
SQL objects like inserts, updates, deletes as well as textual
statements sent using ``text()`` will be compiled such that the dialect
will attempt to render literal values "inline" automatically.
Only a subset of types is typically supported; the
:meth:`.Operations.inline_literal` construct remains as the construct
used to force a specific literal representation of a value.
The :paramref:`.EnvironmentContext.configure.literal_binds` flag
is added to the "offline" section of the ``env.py`` files generated
in new environments.
fixes #255
- enhance the op_fixture as well as MigrationContext._stdout_connection()
 so that it uses the real DefaultImpl
and MigrationContext fully in tests.
2015-04-07 12:41:46 -04:00
Mike Bayer 54e4f58d1f - repair name of starting_rev argument, fixes #290 2015-03-29 09:33:27 -04:00
Mike Bayer 73650a8f19 - dont rely on inpsect import, not in SQLA 0.7 2015-03-28 12:51:45 -04:00
Mike Bayer d5198d0d2b - don't use op.f(), only works with later SQLA versions 2015-03-28 11:56:08 -04:00
Mike Bayer f02f211b93 - Fully implemented the
:paramref:`~.Operations.batch_alter_table.copy_from` parameter for
batch mode, which previously was not functioning.  This allows
"batch mode" to be usable in conjunction with ``--sql``.
fixes #289
- sqlite dialect checks for "create_index" and "drop_index" as exceptions
for "recreate" in batch mode, the same way as "add_column", so that
unnecessary table recreates don't emit for index-only operations
2015-03-27 18:55:00 -04:00
Mike Bayer 9545e87008 - next version 2015-03-27 18:52:20 -04:00
Mike Bayer 2af6e438c9 - Repaired support for the :meth:`.BatchOperations.create_index`
directive, which was mis-named internally such that the operation
within a batch context could not proceed.
fixes #287
2015-03-27 15:15:55 -04:00
Mike Bayer c3e39ec4bf - didn't name the internal number correctly, stil
don't have this right.  up to post2
2015-03-20 15:29:39 -04:00
Mike Bayer e1dc713aa6 - 0.7.5.post1 due to pypi deletion issue 2015-03-20 15:20:10 -04:00
Mike Bayer 5d036bc203 0.7.5 2015-03-19 16:34:56 -04:00
Mike Bayer 4c2f825086 - changelog for #266
- use exception fixture
- look directly at context.as_sql as that's where
the "sql mode" is most authoritative
- fixes #266
2015-03-19 15:51:11 -04:00
Mike Bayer 3b516aecde Merge branch 'issue266' of https://bitbucket.org/jerdfelt/alembic into pr39 2015-03-19 15:40:38 -04:00
Mike Bayer 6235698863 - Fixed bug where the mssql DROP COLUMN directive failed to include
modifiers such as "schema" when emitting the DDL.
fixes #284
2015-03-11 11:34:40 -04:00
Mike Bayer 77a6c827bf - an adjustment to the logic for #282 - if the index we see here
*is* in conn_indexes_by_name, then obviously we should leave it in.
2015-03-10 16:14:21 -04:00
Mike Bayer 46761f9d86 - Postgresql "functional" indexes are necessarily skipped from the
autogenerate process, as the SQLAlchemy backend currently does not
support reflection of these structures.   A warning is emitted
both from the SQLAlchemy backend as well as from the Alembic
backend for Postgresql when such an index is detected.
fixes #282
2015-03-10 11:26:43 -04:00
Mike Bayer 6443b29042 - add support for assertion of warnings emitted 2015-03-10 11:26:21 -04:00
Mike Bayer 826e5cfab5 - make the repo dynamic 2015-03-10 11:26:07 -04:00
Johannes Erdfelt 9e246542f5 Raise exception if autogenerate is tried with as_sql=True
This configuration is nonsensical since autogenerate needs to query
the database for schema information.

Fixes issue #266
2015-02-23 11:08:43 -08:00
Mike Bayer 2108076362 - Fixed bug where MySQL backend would report dropped unique indexes
and/or constraints as both at the same time.  This is because
MySQL doesn't actually have a "unique constraint" construct that
reports differently than a "unique index", so it is present in both
lists.  The net effect though is that the MySQL backend will report
a dropped unique index/constraint as an index in cases where the object
was first created as a unique constraint, if no other information
is available to make the decision.  This differs from other backends
like Postgresql which can report on unique constraints and
unique indexes separately.
fixes #276
2015-02-20 19:20:53 -05:00
Mike Bayer e8a0c740b1 - additional fix which impacts #267. fix filtered_heads() to accommodate
being given "heads" as the target so that it will in fact match when all heads
are given.  fixes #267
2015-02-08 19:28:59 -05:00
Mike Bayer 0955d44f4b - move resolution of "starting rev" for --sql mode into
get_current_heads() directly; therefore we don't need to
do this in alembic.command, which we were doing for stamp but
not downgrade/upgrade.  The slight change here is that the
context.get_starting_revision_argument() method will
return an abbreviated starting rev as abbreviated in
all cases, including the stamp command, where we previously
were converting a stamp argument first, but not for the
upgrade or downgrade commands.
- Fixed bug where using a partial revision identifier as the
"starting revision" in ``--sql`` mode in a downgrade operation
would fail to resolve properly.  fixes #269
2015-02-03 11:51:13 -05:00
Mike Bayer 267063c1b8 remove errant pdb 2015-01-23 20:09:46 -05:00
Mike Bayer 8ea697c93e - Added a new feature :attr:`.Config.attributes`, to help with the use
case of sharing state such as engines and connections on the outside
with a series of Alembic API calls; also added a new cookbook section
to describe this simple but pretty important use case.
2015-01-23 20:05:02 -05:00
Mike Bayer dd4c2ffc91 fix missing changelog directive 2015-01-23 19:41:44 -05:00
Mike Bayer 56d56f55bd - Added support for "alembic stamp" to work when given "heads" as an
argument, when multiple heads are present.
fixes #267
2015-01-23 18:46:53 -05:00
Mike Bayer 7c39f89bb0 - set up for next rev 2015-01-23 18:46:32 -05:00
Mike Bayer 7891f91e85 - fix all flake8 2015-01-23 18:43:44 -05:00
Mike Bayer f215925bea - the enum render is an 0.9 regression, apparently we used
a different repr() scheme in 0.7.9->0.8 that didn't omit native_enum
2015-01-13 20:23:49 -05:00
Mike Bayer f342bd2456 - 0.7.4 2015-01-12 14:16:28 -05:00
Mike Bayer 9f67b90522 - happy new year 2015-01-12 14:15:35 -05:00
Mike Bayer c2ee9f519e changelog for #241, fixes #241 2015-01-12 13:59:15 -05:00
Mike Bayer b2fb21f01e Merge https://bitbucket.org/dtheodor/alembic/branch/master into pr37 2015-01-12 13:49:16 -05:00