summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | - Indexes and unique constraints are now included in theMike Bayer2014-11-022-15/+179
| | | | | | | | | | | | | | :paramref:`.EnvironmentContext.configure.include_object` hook. Indexes are sent with type ``"index"`` and unique constraints with type ``"unique_constraint"``. fixes #203
* | - Bound parameters are now resolved as "literal" values within theMike Bayer2014-11-021-0/+11
| | | | | | | | | | | | SQL expression inside of a CheckConstraint(), when rendering the SQL as a text string; supported for SQLAlchemy 0.8.0 and forward. fixes #219
* | - Added a workaround for SQLAlchemy issue #3023 (fixed in 0.9.5) whereMike Bayer2014-11-021-2/+39
| | | | | | | | | | | | | | | | a column that's part of an explicit PrimaryKeyConstraint would not have its "nullable" flag set to False, thus producing a false autogenerate. Also added a related correction to MySQL which will correct for MySQL's implicit server default of '0' when a NULL integer column is turned into a primary key column. fixes #199
* | - Repaired issue related to the fix for #208 and others; a compositeMike Bayer2014-11-021-0/+36
| | | | | | | | | | | | | | foreign key reported by MySQL would cause a KeyError as Alembic attempted to remove MySQL's implicitly generated indexes from the autogenerate list. fixes #240
* | - If the "alembic_version" table is present in the target metadata,Mike Bayer2014-10-291-9/+67
| | | | | | | | | | | | | | | | | | | | autogenerate will skip this also. Pull request courtesy Dj Gilcrease. fixes #28 - The :paramref:`.EnvironmentContext.configure.version_table` and :paramref:`.EnvironmentContext.configure.version_table_schema` arguments are now honored during the autogenerate process, such that these names will be used as the "skip" names on both the database reflection and target metadata sides. fixes #77
* | - the original rationale for defaulting the user-defined namespaceMike Bayer2014-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to "sa." was to force users to deal with making sure their custom types came from a fixed module somewhere. However, it's not worth defending this rationale. The default value of the :paramref:`.EnvironmentContext.configure.user_module_prefix` parameter is **no longer the same as the SQLAlchemy prefix**. When omitted, user-defined types will now use the ``__module__`` attribute of the type class itself when rendering in an autogenerated module. fixes #229
* | - amending d81619b50b9df7ff4458:Mike Bayer2014-10-201-1/+21
|/ | | | | | | | | Revision files are now written out using the ``'wb'`` modifier to ``open()``, since Mako reads the templates with ``'rb'``, thus preventing CRs from being doubled up as has been observed on windows. The encoding of the output now defaults to 'utf-8', which can be configured using a newly added config file parameter ``output_encoding``. fixes #234
* - fail this before 0.9Mike Bayer2014-10-111-0/+1
|
* - add tests for unique and quote flag on create_index()Mike Bayer2014-10-101-0/+14
|
* - Added support for use of the :class:`~sqlalchemy.sql.elements.quoted_name`Mike Bayer2014-10-031-0/+39
| | | | | | | construct when using the ``schema`` argument within operations. This allows a name containing a dot to be fully quoted, as well as to provide configurable quoting on a per-name basis. fixes #230
* inspectMike Bayer2014-09-201-3/+3
|
* - fix this to be a definite non native boolean dialectMike Bayer2014-09-201-1/+3
|
* - Added a routine by which the Postgresql Alembic dialect inspectsMike Bayer2014-09-201-3/+103
| | | | | | | | | | | | | | the server default of INTEGER/BIGINT columns as they are reflected during autogenerate for the pattern ``nextval(<name>...)`` containing a potential sequence name, then queries ``pg_catalog`` to see if this sequence is "owned" by the column being reflected; if so, it assumes this is a SERIAL or BIGSERIAL column and the server default is omitted from the column reflection as well as any kind of server_default comparison or rendering, along with an INFO message in the logs indicating this has taken place. This allows SERIAL/BIGSERIAL columns to keep the SEQUENCE from being unnecessarily present within the autogenerate operation. fixes #73
* - get tests passing for 0.8, 0.7Mike Bayer2014-09-201-0/+4
|
* - move tests erroneously local to the "named" testsMike Bayer2014-09-201-95/+117
| | | | - add tests for CAST within index
* - more tweaks for server defaults re: comparison, test resultsMike Bayer2014-09-202-11/+33
| | | | | | | | - in particular we've changed the server_default for order.amount to text('0'); SQlite and Postgresql now both report the server default as '0', whereas previously, when we were emitting '0' with the quotes in the CREATE TABLE, SQlite reported it as "'0'" and PG as '0::numeric'.
* pep8Mike Bayer2014-09-201-28/+32
|
* - restore _render_server_default_for_compare() to compare.py usingMike Bayer2014-09-201-1/+7
| | | | | | the method previously used in _render_server_default() in render; these two functions become more specific to compare vs. render now so are separated out
* Merge remote-tracking branch 'github/pr/16' into pr16Mike Bayer2014-09-201-19/+97
|\
| * - Added support for functional indexes when using theMike Bayer2014-08-271-0/+41
| | | | | | | | | | | | | | | | | | | | :meth:`.Operations.create_index` directive. Within the list of columns, the SQLAlchemy ``text()`` construct can be sent, embedding a literal SQL expression; the :meth:`.Operations.create_index` will perform some hackery behind the scenes to get the :class:`.Index` construct to cooperate. This works around some current limitations in :class:`.Index` which should be resolved on the SQLAlchemy side at some point. fixes #222
| * Rendering expressions for indexesCarlos Eduardo Rivera2014-08-271-16/+26
| |
| * adding mike's patchCarlos Eduardo Rivera2014-08-271-4/+56
| |