summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* - use a much bigger stamp here as only three chars can collide quite easilyMike Bayer2014-12-011-1/+1
|
* - repair the rendering of add_fk_constraint(), quoting there tooMike Bayer2014-11-302-4/+33
|
* - naming convention limited to SQLA 0.9.4 or greaterMike Bayer2014-11-301-0/+1
|
* - fix drop_foreign_key to include that this only works with SQLiteMike Bayer2014-11-302-1/+10
| | | | as stated
* - Added :paramref:`~.Operations.batch_alter_table.naming_convention`Mike Bayer2014-11-301-0/+24
| | | | | | | | | 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
* - name the include_object hook "foreign_key_constraint"Mike Bayer2014-11-302-7/+42
| | | | | - changelog and other doc updates, fixes #178 - fix drop_constraint() unit tests and add two more for FKs
* - refactor the FK merge a bitMike Bayer2014-11-303-91/+308
| | | | | | | | | | | | | | | | | | | | - 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
* - Merge branch 'add_fk_check' of https://bitbucket.org/akamyshnikova/alembic ↵Mike Bayer2014-11-302-37/+288
|\ | | | | | | | | | | | | | | | | | | | | into pr32 - complete merge, get all tests passing - use 'foreignkey' literal Conflicts: alembic/autogenerate/compare.py tests/test_autogenerate.py
| * Fix failing unittests and update compare_fk methodAnn Kamyshnikova2014-11-251-1/+2
| |
| * Add composite fk support, add more testsAnn Kamyshnikova2014-11-071-1/+146
| |
| * Update and add some tests for checking fkAnn Kamyshnikova2014-11-072-20/+113
| | | | | | | | fixes issue #178
* | - Fixed bug where the "source_schema" argument was not correctly passedMike Bayer2014-11-301-4/+57
| | | | | | | | | | | | when calling :meth:`.BatchOperations.create_foreign_key`. Pull request courtesy Malte Marquarding. - add tests
* | - Repaired the inspection, copying and rendering of CHECK constraintsMike Bayer2014-11-292-5/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and so-called "schema" types such as Boolean, Enum within the batch copy system; the CHECK constraint will not be "doubled" when the table is copied, and additionally the inspection of the CHECK constraint for its member columns will no longer fail with an attribute error. fixes #249 - Added two new arguments :paramref:`.Operations.batch_alter_table.reflect_args` and :paramref:`.Operations.batch_alter_table.reflect_kwargs`, so that arguments may be passed directly to suit the :class:`~.sqlalchemy.schema.Table` object that will be reflected.
* | - add a missing @classmethod decorator...Mike Bayer2014-11-241-0/+1
| |
* | - The ``alembic revision`` command accepts the ``--sql`` option toMike Bayer2014-11-231-0/+22
| | | | | | | | | | | | | | | | | | | | | | suit some very obscure use case where the ``revision_environment`` flag is set up, so that ``env.py`` is run when ``alembic revision`` is run even though autogenerate isn't specified. As this flag is otherwise confusing, error messages are now raised if ``alembic revision`` is invoked with both ``--sql`` and ``--autogenerate`` or with ``--sql`` without ``revision_environment`` being set. fixes #248
* | - Relative revision identifiers as used with ``alembic upgrade``,Mike Bayer2014-11-231-0/+46
| | | | | | | | | | | | ``alembic downgrade`` and ``alembic history`` can be combined with specific revisions as well, e.g. ``alembic upgrade ae10+3``, to produce a migration target relative to the given exact version.
* | - ensure we include for dependencies when we do a stamp, add an optionMike Bayer2014-11-231-0/+7
| | | | | | | | to filter_for_lineage
* | - add another test around something that is bugging/confusing me...Mike Bayer2014-11-221-0/+66
| | | | | | | | but i guess it's OK
* | - fixesMike Bayer2014-11-221-33/+68
| |
* | - In conjunction with support for multiple independent bases, theMike Bayer2014-11-221-16/+63
| | | | | | | | | | | | | | | | | | | | specific version directories are now also configurable to include multiple, user-defined directories. When multiple directories exist, the creation of a revision file with no down revision requires that the starting directory is indicated; the creation of subsequent revisions along that lineage will then automatically use that directory for new files. fixes #124
* | - break out the concept of "down revision" into two pieces:Mike Bayer2014-11-221-0/+157
| | | | | | | | | | | | | | | | down_revision and "dependencies". For migration traversal, the downrevs we care about are the union of these two sets. however for location of nodes and branch labeling, we look only at down_revsion. this works really well and allows us to have mutually-dependent trees that can easily be itererated independently of each other. docs are needed
* | - support the case where a mergepoint has a branchpoint immediatelyMike Bayer2014-11-221-14/+167
| | | | | | | | | | | | | | | | following it; this will be the norm in the case where parallel branches refer to each other as dependencies. this means we need to limit for from/to revisions based on current heads / ancestors of those heads whenever we merge/unmerge.
* | ModelOne now has unique constraints so require thatMike Bayer2014-11-211-0/+2
| |
* | - Added a rule for Postgresql to not render a "drop unique" and "drop index"Mike Bayer2014-11-211-0/+19
| | | | | | | | | | | | | | | | given the same name; for now it is assumed that the "index" is the implicit one Postgreql generates. Future integration with new SQLAlchemy 1.0 features will improve this to be more resilient. fixes #247
* | include indexes in batchMike Bayer2014-11-212-9/+50
| |
* | - A change in the ordering when columns and constraints are dropped;Mike Bayer2014-11-211-53/+89
| | | | | | | | | | | | | | autogenerate will now place the "drop constraint" calls *before* the "drop column" calls, so that columns involved in those constraints still exist when the constraint is dropped. fixes #247
* | - The "multiple heads / branches" feature has now landed. This isMike Bayer2014-11-207-117/+1585
| | | | | | | | | | | | | | | | | | | | | | | | | | | | by far the most significant change Alembic has seen since its inception; while the workflow of most commands hasn't changed, and the format of version files and the ``alembic_version`` table are unchanged as well, a new suite of features opens up in the case where multiple version files refer to the same parent, or to the "base". Merging of branches, operating across distinct named heads, and multiple independent bases are now all supported. The feature incurs radical changes to the internals of versioning and traversal, and should be treated as "beta mode" for the next several subsequent releases within 0.7. fixes #167
* | - changelog + some polishMike Bayer2014-11-201-9/+15
| |
* | Merge branch '242-config-vars' of https://bitbucket.org/nibrahim/alembic ↵Mike Bayer2014-11-201-0/+14
|\ \ | | | | | | | | | into pr33
| * | Adds tests for config_argsNoufal Ibrahim2014-11-201-0/+14
| | |
* | | - Fixed a variety of issues surrounding rendering of Python code thatMike Bayer2014-11-161-37/+104
|/ / | | | | | | | | | | | | | | | | | | | | contains unicode literals. The first is that the "quoted_name" construct that SQLAlchemy uses to represent table and column names as well as schema names does not ``repr()`` correctly on Py2K when the value contains unicode characters; therefore an explicit stringification is added to these. Additionally, SQL expressions such as server defaults were not being generated in a unicode-safe fashion leading to decode errors if server defaults contained non-ascii characters. fixes #243
* | - reorganize tests that deal with running scriptsMike Bayer2014-11-105-173/+181
| | | | | | | | and reading scripts; try to put tests against common themes together, improve names
* | - move the tests concerning #95 to test_versioning, which is currentlyMike Bayer2014-11-102-31/+43
| | | | | | | | where the tests focus on consumption of the versions/ directory.
* | Merge branch 'add_column_with_index' of ↵Mike Bayer2014-11-101-0/+9
|\ \ | | | | | | | | | https://bitbucket.org/davidszotten/alembic into pr29
| * | Create index in add_column if requestedDavid Szotten2014-10-161-0/+9
| | | | | | | | | | | | Fixes #174
* | | - test fixupMike Bayer2014-11-092-1/+37
| | | | | | | | | | | | | | | | | | - get batch mode to fail gracefully, dropping the temp table if the operation fails - finish tutorial
* | | - add a type here so that to account for pre-0.9 FK/type supportMike Bayer2014-11-091-1/+1
| | |
* | | Merge branch 'master' into batch_alterMike Bayer2014-11-091-7/+11
|\ \ \
| * | | - adjust these to account for some MySQL deprecations regardingMike Bayer2014-11-091-7/+11
| | | | | | | | | | | | | | | | duplicate indexes against the same columns
* | | | - add some connection cleanupMike Bayer2014-11-093-4/+10
| | | |
* | | | - add a little step to get PG to work rudimentally, howeverMike Bayer2014-11-081-3/+13
| | | | | | | | | | | | | | | | | | | | the drop + recreate routine still needs a solution for refernential integrity for it to be of general use
* | | | - start docsMike Bayer2014-11-081-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - run tests against mysql/PG to make sure auto mode works at least, try a proof of concept recreate for MySQL. recreate doesn't work on PG as constraint names are global (ugh). Will have to figure something out on that.
* | | | - round trip testsMike Bayer2014-11-081-7/+148
| | | | | | | | | | | | | | | | - fixes to add column
* | | | Merge branch 'master' into batch_alterMike Bayer2014-11-082-2/+42
|\ \ \ \ | |/ / /
| * | | - The :class:`~sqlalchemy.schema.Table` object is now returned whenMike Bayer2014-11-082-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the :meth:`.Operations.create_table` method is used. This ``Table`` is suitable for use in subsequent SQL operations, in particular the :meth:`.Operations.bulk_insert` operation. fixes #205
* | | | - finish up most featuresMike Bayer2014-11-081-22/+172
| | | |
* | | | move thisMike Bayer2014-11-081-2/+1
| | | |
* | | | - testing approaches for BatchOperationsImpl and ApplyBatchImplMike Bayer2014-11-081-0/+182
| | | |
* | | | - add tests for batch autogenerateMike Bayer2014-11-071-12/+113
|/ / /
* | | - skip unique constraint tests on 0.7Mike Bayer2014-11-051-0/+3
| |/ |/|