summaryrefslogtreecommitdiff
path: root/alembic/migration.py
Commit message (Collapse)AuthorAgeFilesLines
* - convert arg system to be a little cleanerMike Bayer2014-11-191-1/+0
| | | | - other tweaks
* - add a comma-formatting system, apply to templates, log messagesMike Bayer2014-11-191-4/+4
| | | | - fix up version testing used by autogenerate, add lots of tests
* - support multiple revisions argumentsMike Bayer2014-11-181-4/+7
|
* everythings passing, again.Mike Bayer2014-11-181-2/+1
|
* - stamp is working againMike Bayer2014-11-181-20/+73
|
* - start fixing testsMike Bayer2014-11-181-1/+13
|
* - OK this seems to traverse correctly across diamonds now, now to rewriteMike Bayer2014-11-181-7/+37
| | | | all the tests and haven't even started docs yet...
* - this is a new approach which means I have to rewrite the tests againMike Bayer2014-11-181-69/+130
| | | | and re-do "stamp", but better control at the version table level
* - ensure the doc is not sent into the SQL comment in offline modeMike Bayer2014-11-171-5/+9
|
* - add branch_name argumentMike Bayer2014-11-171-3/+5
|
* - get all current tests passingMike Bayer2014-11-171-4/+9
|
* - working through stamp use casesMike Bayer2014-11-171-1/+17
|
* - base creating/dropping version table in offline modeMike Bayer2014-11-141-6/+2
| | | | on the "heads" set alone
* - factor out version table operations, mirror them in an offline set of heads,Mike Bayer2014-11-141-71/+147
| | | | get migration script running back online
* - create a system by which _upgrade_revs() and _downgrade_revs() can alsoMike Bayer2014-11-141-3/+45
| | | | | | | pass a flag indicating when a version update is a new branch create or branch delete, instead of an update. this along with merge information provides _update_current_rev with all the info it needs to update the version table.
* - start adding the concept of multiple heads into versioning, stampingMike Bayer2014-11-111-7/+58
|
* - make version table manipulations "safe" when multiple (or no) rowsMike Bayer2014-11-111-7/+31
| | | | may be present
* - If the "alembic_version" table is present in the target metadata,Mike Bayer2014-10-291-2/+4
| | | | | | | | | | 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
* - fix long lines within packageMike Bayer2014-09-091-7/+9
|
* - do an autopep8 pass for just about everything otherMike Bayer2014-09-091-45/+46
| | | | than line length
* Eliminate {} (dict) default arg value for `opts`Marc Abramowitz2014-05-281-1/+4
| | | | | | | | | to MigrationContext.configure Using a mutable type as a default value is a common source of obscure problems. See http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments
* - changelog + test for MigrationContext.configMike Bayer2014-05-251-1/+5
|
* Add EnvironmentContext and Config to MigrationContextMarc Abramowitz2014-05-191-2/+12
| | | | | | | | This lets migrations do stuff like: op.get_context().config.get_main_option('schema') where `schema` is a custom option that I added to alembic.ini
* - Added new feature ↵Mike Bayer2014-05-021-19/+52
| | | | | | | | | | :paramref:`.EnvironmentContext.configure.transaction_per_migration`, which when True causes the BEGIN/COMMIT pair to incur for each migration individually, rather than for the whole series of migrations. This is to assist with some database directives that need to be within individual transactions, without the need to disable transactional DDL entirely. fixes #201
* Fixes to Py3k in-place compatibity regarding output encoding and related;Mike Bayer2013-11-211-6/+6
| | | | | | | the use of the new io.* package introduced some incompatibilities on Py2k. These should be resolved, due to the introduction of new adapter types for translating from io.* to Py2k file types, StringIO types. Thanks to Javier Santacruz for help with this.
* Fixes stdout --sql output in python2Javier Santacruz2013-10-171-5/+6
| | | | | | | | | When output_encoding is set, wraps the output buffer into a io.TextIOWrapper class This means that the output_buffer has to be a io.IOBase instance in order to work along with the TextIOWrapper Handles wrapping when the buffer is Python2 stdtout, which has 'file' type Adds test for this situation
* Fix calling of custom type compare functionMaarten van Schaik2013-08-281-1/+1
|
* Added new kw argument to :meth:`.EnvironmentContext.configure`Mike Bayer2013-07-111-3/+5
| | | | | | | | | | ``include_object``. This is a more flexible version of the ``include_symbol`` argument which allows filtering of columns as well as tables from the autogenerate process, and in the future will also work for types, constraints and other constructs. The fully constructed schema object is passed, including its name and type as well as a flag indicating if the object is from the local application metadata or is reflected.
* - will call this 0.6Mike Bayer2013-04-121-2/+2
| | | | | | | | | | | | | | | | | - cleanup unused symbols in compat - move any remaining conditional import switches out to compat - pretty sure anything we use for a buffer will have flush() - I can see that using the new io.* stuff means codecs isn't too smooth here, but removed the double-wrap check in migration.py which seems to be due to the bytesio setup in the test suite, simplified this so that an encoding-writing test just writes to BytesIO - removed all "from __future__ import with_statement" - i think when we load_source(), that file might not be ascii so we need to open as bytes - make encoding an explcit argument in test suite write_script() - sort the columns in autogenerate so that the autogen tests run consistently on python3.3, seems to have a very random set ordering, also loosen up an ordered check in test_op
* callable() revidedHong Minhee2013-04-131-3/+3
|
* Use collections.Callable ABC instead of callable() predicateHong Minhee2013-04-131-2/+3
|
* Use io instead of codecs and StringIOHong Minhee2013-04-131-4/+6
|
* Use relative importsHong Minhee2013-04-111-5/+6
| | | | | | | | | | | | | | | | | | | | | 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.
* - changelogMike Bayer2013-04-041-2/+2
| | | | | - test for #76 - don't need output_encoding explicit here
* Merged in cblume/alembic (pull request #24)Mike Bayer2013-04-041-1/+3
|\ | | | | | | Changes in MigrationContext and ScriptDirectory
| * - added option 'version_table_schema' to version_table in __init__ of ↵Christian Blume2012-10-051-1/+3
| | | | | | | | MigrationContext -> makes it possible to use 'version_table_schema' option in context.configure() of env.py
* | Added ``output_encoding`` option toMike Bayer2013-04-041-0/+5
| | | | | | | | | | | | | | :meth:`.EnvironmentContext.configure`, used with ``--sql`` mode to apply an encoding to the output stream. #90
* | Merged in dahlia/alembic/upgrade-message (pull request #30)Mike Bayer2013-04-041-4/+8
|\ \ | | | | | | | | | Print message to each upgrade/downgrade step
| * | Print message to each upgrade/downgrade stepHong Minhee2013-03-311-4/+8
| | |
* | | Removed unused imports from alembic/ directoryHong Minhee2013-03-311-2/+1
|/ /
* | - The rendering of any construct during autogenerateMike Bayer2013-03-041-1/+0
| | | | | | | | | | | | | | | | 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
* | update sqla links for 0.8 docsMike Bayer2012-12-091-2/+2
|/
* Merged in BryceLohr/alembic (pull request #14)Mike Bayer2012-09-301-2/+2
|\
| * Merged revision 6ed983fc075450d874557e81feb0237d7a28a222 from upstream ↵Bryce Lohr2012-05-071-2/+2
| |\ | | | | | | | | | default tip
| | * Added missing 'execution_options' kwarg that only appeared to be used from ↵Bryce Lohr2012-04-251-2/+2
| | | | | | | | | | | | the multidb template.
* | | whitespace removalMike Bayer2012-08-151-45/+45
|/ /
* | Make version table name configurable.Jeff Dairiki2012-05-031-12/+12
|/
* - move to 0.3 as we are changing APIrel_0_3_0Mike Bayer2012-04-051-20/+75
| | | | | | | | | | | | | | | | | | | | | - [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.
* fix docstring referencesrel_0_2_0Mike Bayer2012-01-301-3/+3
|
* fix long linesMike Bayer2012-01-301-10/+13
|