| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
- other tweaks
|
|
|
|
| |
- fix up version testing used by autogenerate, add lots of tests
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
all the tests and haven't even started docs yet...
|
|
|
|
| |
and re-do "stamp", but better control at the version table level
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
on the "heads" set alone
|
|
|
|
| |
get migration script running back online
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
may be present
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
than line length
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
: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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
``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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
- test for #76
- don't need output_encoding explicit here
|
|\
| |
| |
| | |
Changes in MigrationContext and ScriptDirectory
|
| |
| |
| |
| | |
MigrationContext -> makes it possible to use 'version_table_schema' option in context.configure() of env.py
|
| |
| |
| |
| |
| |
| |
| | |
:meth:`.EnvironmentContext.configure`,
used with ``--sql`` mode to apply an encoding
to the output stream.
#90
|
|\ \
| | |
| | |
| | | |
Print message to each upgrade/downgrade step
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/ |
|
|\ |
|
| |\
| | |
| | |
| | | |
default tip
|
| | |
| | |
| | |
| | | |
the multidb template.
|
|/ / |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- [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.
|
| |
|
| |
|