| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Running ``alembic edit`` will open the latest revision in a text-editor.
|
|
|
|
| |
- warn for name changes
|
|
|
|
| |
- add missing translate for create_pk
|
|
|
|
|
|
|
|
|
| |
This is so that we can do a total open ended "*args, **kw" style translation
for the vast majority of use cases that are using alembic.op, without impacting
docstrings for the Operations class.
There is a risk here of impacting an application that is using Operations
directly instantitaed while using old names. We may still have to accommodate
that somehow.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
portable to the name itself. so we don't need to handle this arg
explicitly.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- The internal system for Alembic operations has been reworked to now
build upon an extensible system of operation objects. New operations
can be added to the ``op.`` namespace, including that they are
available in custom autogenerate schemes. fixes #302
- The internal system for autogenerate been reworked to build upon
the extensible system of operation objects present in #302.
A new customization hook process_revision_directives is added
to allow manipulation of the autogen stream. Fixes #301
|
|
|
|
| |
the fix was committed in 229f8672.
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
warnings
|
|
|
|
|
|
|
| |
"ondelete" would not render within the ``op.create_foreign_key()``
directive, even though they render within a full
``ForeignKeyConstraint`` directive.
fixes #298
|
| |
|
| |
|
|\
| |
| |
| | |
Fix typo in autogenerate documentation
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| | |
- fixed spelling mistake in docs
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
: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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
: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
|
| |
|
|
|
|
|
|
| |
directive, which was mis-named internally such that the operation
within a batch context could not proceed.
fixes #287
|
|
|
|
| |
don't have this right. up to post2
|
| |
|
| |
|
|
|
|
|
|
|
| |
- use exception fixture
- look directly at context.as_sql as that's where
the "sql mode" is most authoritative
- fixes #266
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
This configuration is nonsensical since autogenerate needs to query
the database for schema information.
Fixes issue #266
|
| |
| |
| |
| |
| | |
modifiers such as "schema" when emitting the DDL.
fixes #284
|
| |
| |
| |
| | |
*is* in conn_indexes_by_name, then obviously we should leave it in.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
being given "heads" as the target so that it will in fact match when all heads
are given. fixes #267
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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.
|