| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
| |
argument, when multiple heads are present.
fixes #267
|
| |
|
| |
|
|
|
|
| |
a different repr() scheme in 0.7.9->0.8 that didn't omit native_enum
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not wrap string defaults with single quotes when comparing against
columns of type float or numeric.
This fixes the crash occuring when the default of a float column is
an integer value (e.g., DEFAULT 5), while the Python server_default is
a string (e.g., server_default="5.0"). This results in the query
used in the comparison to throw a DataError ('SELECT 5 = '5.0').
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
will now ensure that the names of the source and target columns are
the database-side name of each column, and not the value of the
``.key`` attribute as may be set only on the Python side.
This is because Alembic generates the DDL for constraints
as standalone objects without the need to actually refer to an in-Python
:class:`~sqlalchemy.schema.Table` object, so there's no step that
would resolve these Python-only key names to database column names.
fixes #259
|
|
|
|
|
|
|
|
|
|
|
| |
used custom column keys (e.g. using the ``key='foo'`` kwarg to
``Column``), the comparison of existing foreign keys to those specified
in the metadata would fail, as the reflected table would not have
these keys available which to match up. Foreign key comparison for
autogenerate now ensures it's looking at the database-side names
of the columns in all cases; this matches the same functionality
within unique constraints and indexes.
fixes #260
|
| |
|
| |
|
|
|
|
|
|
| |
to modules that have the name "sqlalchemy" in them would be mistaken
as being part of the ``sqlalchemy.`` namespace. Pull req courtesy
Bartosz Burclaf. fixes #261
|
| |
|
| |
|
|
|
|
|
|
| |
operation would fail on AttributeError if no version files were
present at all.
fixes #258
|
|
|
|
|
|
| |
https://bitbucket.org/zzzeek/sqlalchemy/issue/3218
is blowing up our sphinx build
|
| |
|
|
|
|
|
|
|
| |
to work fully with the current SQLAlchemy 1.0, which now will report
on UNIQUE constraints that have no name.
- fix named foreign key test requirements for SQLAlchemy 1.0 sqlite
FK reflection
|
| |
|
| |
|
|
|
|
|
|
| |
foreign keys to the same target table, the batch mechanics would
fail with a "table already exists" error. Thanks for the help
on this from Lucas Kahlert. fixes #254
|
|
|
|
|
|
|
| |
the overridden ``_exec()`` method failed to return a value, as is
needed now in the 0.7 series. fixes #253
- add __backend__ to UpdateRevTest which does a great job testing
_exec() pathing for all backends
|
|
|
|
|
|
| |
- skip index at the level of the index, not the columns inside it
- changelog
- bump for 0.7.2
|
|\
| |
| |
| | |
https://bitbucket.org/jerdfelt/alembic into pr35
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MySQL will implicitly create indexes when using foreign keys. Alembic
attempts to remove those implicit indexes so they don't appear as
removes when comparing metadata.
However, unique indexes with the same name as a column are considered
as possibly implicitly created causing alembic to emit a spurious
'remove_constraint'.
Since MySQL will never implicitly create unique indexes, they can be
safely ignored when removing the implicit indexes.
Fixes #251
|
| | |
|
|/
|
|
|
| |
so all autogenerates were spitting out batch mode...this has been
fixed so that batch mode again is only when selected in env.py.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
as stated
|
|
|
|
| |
from the preceding sections.
|
|
|
|
|
|
|
|
|
| |
argument to :meth:`.Operations.batch_alter_table`, as this is necessary
in order to drop foreign key constraints; these are often unnamed
on the target database, and in the case that they are named, SQLAlchemy
is as of the 0.9 series not including these names yet.
- rework the docs on batch + constraints, which remains subject
to a lot of caveats and problems, some to be resolved in SQLAlchemy 1.0
|
|
|
|
|
| |
- changelog and other doc updates, fixes #178
- fix drop_constraint() unit tests and add two more for FKs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- getting at attributes of FKs varies a bit on SQLA versions,
so implement an _fk_spec() called for all FK inspection
- to enable include_object() filters and allow the FK constraint
code to flow like that of indexes/uniques, change the approach
so that we deal with an _fk_constraint_sig() object again which
contains the real ForeignKeyConstraint() within; we need this
anyway for include_object, but also allows us to use the standard
"drop_constraint" call for rendering.
- enhance tests in test_autogen_fks to support real FK databases like
Postgresql, MySQL, add in InnoDB flags and ensure that FKs refer
to real primary key constraints for PG support
- implement and test include_object() support for FKs
- inspectors all have get_foreign_keys(), no need to check
- repair the drop_constraint call to quote the "type" and table
name correctly, run all constraint drops through drop_constraint()
for rendering
- fix up schema identifiers for foreign key autogens
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
into pr32
- complete merge, get all tests passing
- use 'foreignkey' literal
Conflicts:
alembic/autogenerate/compare.py
tests/test_autogenerate.py
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
fixes issue #178
|
| |
| |
| |
| | |
Issue #178
|
| |
| |
| |
| |
| |
| | |
when calling :meth:`.BatchOperations.create_foreign_key`. Pull
request courtesy Malte Marquarding.
- add tests
|