summaryrefslogtreecommitdiff
path: root/tests/test_autogenerate.py
Commit message (Collapse)AuthorAgeFilesLines
...
* | Repaired autogenerate rendering of ForeignKeyConstraintMike Bayer2013-04-151-0/+13
| | | | | | | | to include use_alter argument, if present.
* | Introduce compatibility moduleHong Minhee2013-04-131-1/+0
| |
* | basestring and str are gone since Python 3Hong Minhee2013-04-131-1/+1
| |
* | Use relative importsHong Minhee2013-04-111-6/+9
|/ | | | | | | | | | | | | | | | | | | | | This change does not affect to any behaviors of it, but is just stylish improvements to remove 2to3 dependency. 1. All old-style absolute imports e.g. `from alembic import util` are replaced by relative imports e.g. `from . import util`. 2. Use of proxy modules (`alembic.op` and `alembic.context`) are replaced by deferred import patterns, but these modules still exist. 3. Imports are grouped by 3 types of their origins (standard libraries, third party libraries, and local modules) and blank lines are put between each group of imports. This style is from PEP 8: <http://www.python.org/dev/peps/pep-0008/#imports> For stylish change, I can't do that much, because it was intentionally done as it was by the author. If the author will allow me to make it more closer to PEP 8 style, I will do that as well.
* latin1, utf8, fix itMike Bayer2013-03-171-1/+2
|
* force this to innodb to support mysqls with differentMike Bayer2013-03-121-1/+2
| | | | defaults here
* Autogenerate will render additional table keywordMike Bayer2013-03-121-1/+21
| | | | | | arguments like "mysql_engine" and others within op.create_table(). #110
* - The rendering of any construct during autogenerateMike Bayer2013-03-041-1/+33
| | | | | | | | can be customized, in particular to allow special rendering for user-defined column, constraint subclasses, using new ``render_item`` argument to :meth:`.EnvironmentContext.configure`. #108
* Fixed bug where autogenerate would fail if a ColumnMike Bayer2013-01-111-0/+42
| | | | | to be added to a table made use of the ".key" paramter. #99
* - add workaround to setup.py to avoid setuptools issue regarding multiprocessingMike Bayer2013-01-051-0/+11
| | | | | | | | | | when "setup.py test" is run, #96 - add version detection for 0.8, apply this version detection to test_autogenerate:AutogenRenderTest.test_render_fk_constraint_kwarg and emit explicit append_constraint() for each FK if not on 0.8 as FKs do not auto-attach in 0.7, #96 - add a README containing instructions for running tests and setting up optional database backens, #96
* Added support for autogenerate render ofMike Bayer2012-12-051-1/+30
| | | | | | ForeignKeyConstraint options onupdate, ondelete, initially, and deferred. #92
* Autogenerate will include "autoincrement=False"Mike Bayer2012-12-051-3/+17
| | | | | | | in the rendered table metadata if this flag was set to false on the source :class:`.Column` object. #94
* - more foreign key stuffrel_0_4_0Mike Bayer2012-10-011-6/+54
|
* - add schema here to the FKMike Bayer2012-10-011-2/+7
|
* - [feature] Support for tables in alternate schemasMike Bayer2012-09-301-57/+152
| | | | | | | | | | | | has been added fully to all operations, as well as to the autogenerate feature. When using autogenerate, specifying the flag include_schemas=True to Environment.configure() will also cause autogenerate to scan all schemas located by Inspector.get_schema_names(), which is supported by *some* (but not all) SQLAlchemy dialects including Postgresql. *Enormous* thanks to Bruno Binet for a huge effort in implementing as well as writing tests. #33.
* - merge againMike Bayer2012-09-301-25/+246
|\
| * add support of schemas for autogenerateBruno Binet2012-09-271-25/+246
| | | | | | | | for some reasons one of the new tests fails
* | - test fix here to limit table names locatedMike Bayer2012-09-301-0/+1
|/
* - add a test for #15Mike Bayer2012-08-221-1/+15
|
* - [feature] Added include_symbol option torel_0_3_6Mike Bayer2012-08-151-7/+31
| | | | | | | EnvironmentContext.configure(), specifies a callable which will include/exclude tables in their entirety from the autogeneration process based on name. #27
* - add a test for Enum repr() - requires SQLA 0.7.9 or 0.8Mike Bayer2012-08-081-1/+17
|
* - [bug] Fixed issue whereby when autogenerate wouldMike Bayer2012-07-081-14/+120
| | | | | | | | | | | render create_table() on the upgrade side for a table that has a Boolean type, an unnecessary CheckConstraint() would be generated. #58 - [feature] Implemented SQL rendering for CheckConstraint() within autogenerate upgrade, including for literal SQL as well as SQL Expression Language expressions.
* some trailing whitespace removal which autogenerate tests are particularly ↵Mike Bayer2012-07-081-33/+33
| | | | sensitive towards
* - apply repr() to server default string, #31Mike Bayer2012-06-231-0/+8
|
* - [feature] Added support for UniqueConstraintMike Bayer2012-04-211-3/+7
| | | | in autogenerate, courtesy Atsushi Odagiri
* uniqueconstraintAtsushi Odagiri2012-04-201-2/+5
|
* - move to 0.3 as we are changing APIrel_0_3_0Mike Bayer2012-04-051-7/+7
| | | | | | | | | | | | | | | | | | | | | - [general] The focus of 0.3 is to clean up and more fully document the public API of Alembic, including better accessors on the MigrationContext and ScriptDirectory objects. Methods that are not considered to be public on these objects have been underscored, and methods which should be public have been cleaned up and documented, including: MigrationContext.get_current_revision() ScriptDirectory.iterate_revisions() ScriptDirectory.get_current_head() ScriptDirectory.get_heads() ScriptDirectory.get_base() ScriptDirectory.generate_revision() - [feature] Added a bit of autogenerate to the public API in the form of the function alembic.autogenerate.compare_metadata.
* Autogenerate now orders tables correctly. Dependency tables now appear ↵jayd3e2012-03-121-19/+88
| | | | before their dependant tables. Also added the respective tests.
* - [bug] Fixed the generation of CHECK constraint,Mike Bayer2012-01-311-1/+3
| | | | regression from 0.2.0 [#26]
* - [feature] The naming of revision files canMike Bayer2012-01-241-3/+6
| | | | | | | | | | | | now be customized to be some combination of "rev id" and "slug", the latter of which is based on the revision message. By default, the pattern "<rev>_<slug>" is used for new files. New script files should include the "revision" variable for this to work, which is part of the newer script.py.mako scripts. [#24]
* this is all tests passing with the refactor, which IMHO isMike Bayer2012-01-241-23/+40
| | | | miraculous
* Column names were not wrapped in quotes when autogenerating a ↵Samuel Rayment2012-01-041-3/+3
| | | | ForeignKeyConstraint.
* - [bug] Default prefix for autogenerateMike Bayer2012-01-021-23/+24
| | | | | | | | | directives is "op.", matching the mako templates. [#18] - [feature] Add alembic_module_prefix argument to configure() to complement sqlalchemy_module_prefix. [#18]
* - [bug] Fix autogenerate bug that preventedMike Bayer2011-12-281-1/+18
| | | | | | correct reflection of a foreign-key referenced table in the list of "to remove". [#16]
* - [bug] Fix autogenerate so that "pass" isMike Bayer2011-12-201-1/+17
| | | | | generated between the two comments if no net migrations were present.
* - Clean up file write operations so thatMike Bayer2011-12-031-55/+46
| | | | | | file handles are closed. - PyPy is supported.
* python 3 works ! near zero changes neededMike Bayer2011-11-291-9/+16
|
* - add test for dialect/impl-specific affinity comparison, #5Mike Bayer2011-11-291-1/+19
|
* - add version check for at least 06, tests for 07 in selectedMike Bayer2011-11-281-1/+4
| | | | | | | | | | | | areas - add "requires 07" decorators to test suite - add tests for PG ENUM in offline mode. works in conjunction with the latest 0.7.4 tip of SQLAlchemy, fixes #9. Docs will be needed to illustrate how ENUM should be used. - add support for table before_create and after_create events within op.create_table(). Currently this will do the ENUM thing for PG but will also invoke any other kinds of events that might get configured on the table.
* add tests for #7Mike Bayer2011-11-281-7/+32
|
* - rename autogenerate_metadata to target_metadata, ↵Mike Bayer2011-11-281-2/+2
| | | | | | | autogenerate_sqlalchemy_prefix to sqlalchemy_module_prefix - add create_check_constraint() directive
* - move comparison of types, server default to the context.Mike Bayer2011-11-281-17/+24
| | | | | | | | | | | | PG context in particular does some tricks to help these. - But since type/default comparison is still loaded with surprises, particularly the MySQL/MSSQL TINYINT/BIT-> boolean thing which we can work around but haven't yet, turn both off by default. They aren't super useful compared to the huge number of wrong results they can currently emit. - Also add a plugin system for type/server default comparison. - everything works but we're coding way ahead of tests at this point
* share imports among multi runs in one setMike Bayer2011-11-281-1/+1
|
* - rework MySQL + autogenerate so thatMike Bayer2011-11-281-44/+47
| | | | | | | | | | | | multiple changes to a single col are collapsed into one step, will work for other dialects which may support this too - add support for "imports" in scripts so that dialect-specific types can be rendered straight in from their parent module and work immediately - rework the internals of autogenerate to be more succinct, though there's a lot more that could happen here to make this easier
* initial MySQL support, good thing we triedMike Bayer2011-11-281-40/+96
| | | | this before releasing
* - use new sa. import in tutorial examplesMike Bayer2011-11-271-6/+15
| | | | - add an alter column autogen test with an FK constraint
* - docsMike Bayer2011-11-271-3/+3
| | | | | | | - note about unicode - dont need importlater - use correct type_ kw arg - log cols/tables/etc as we autogenerate
* - support for schema types in modify typeMike Bayer2011-11-271-5/+6
| | | | | | | - add known status to CHANGES - google group - sa. prefix on modify type in autogenerate - rename_table
* make sure type gets the prefix in modify typeMike Bayer2011-11-271-7/+13
|
* more tests and now its sort of workingMike Bayer2011-11-271-19/+81
|