forked from pool/python-alembic
- update to 0.7.5.post2 - set minimum version for SQLAlchemy to 0.7.6 - use update-alternatives for alembic binary - always run the tests when building the package OBS-URL: https://build.opensuse.org/request/show/303943 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-alembic?expand=0&rev=36
427 lines
23 KiB
Plaintext
427 lines
23 KiB
Plaintext
-------------------------------------------------------------------
|
||
Sat Apr 25 15:53:02 UTC 2015 - benoit.monin@gmx.fr
|
||
|
||
- update to 0.7.5.post2:
|
||
* Added a new feature Config.attributes, to help with the use
|
||
case of sharing state such as engines and connections on the
|
||
outside with a series of Alembic API calls; also added a new
|
||
cookbook section to describe this simple but pretty important
|
||
use case.
|
||
* The format of the default env.py script has been refined a bit;
|
||
it now uses context managers not only for the scope of the
|
||
transaction, but also for connectivity from the starting
|
||
engine. The engine is also now called a “connectable” in
|
||
support of the use case of an external connection being passed
|
||
in.
|
||
* Added support for “alembic stamp” to work when given “heads” as
|
||
an argument, when multiple heads are present.
|
||
* The --autogenerate option is not valid when used in conjunction
|
||
with “offline” mode, e.g. --sql. This now raises a
|
||
CommandError, rather than failing more deeply later on. Pull
|
||
request courtesy Johannes Erdfelt.
|
||
* Fixed bug where the mssql DROP COLUMN directive failed to
|
||
include modifiers such as “schema” when emitting the DDL.
|
||
* Postgresql “functional” indexes are necessarily skipped from
|
||
the autogenerate process, as the SQLAlchemy backend currently
|
||
does not support reflection of these structures. A warning is
|
||
emitted both from the SQLAlchemy backend as well as from the
|
||
Alembic backend for Postgresql when such an index is detected.
|
||
* Fixed bug where MySQL backend would report dropped unique
|
||
indexes and/or constraints as both at the same time. This is
|
||
because MySQL doesn’t actually have a “unique constraint”
|
||
construct that reports differently than a “unique index”, so it
|
||
is present in both lists. The net effect though is that the
|
||
MySQL backend will report a dropped unique index/constraint as
|
||
an index in cases where the object was first created as a
|
||
unique constraint, if no other information is available to make
|
||
the decision. This differs from other backends like Postgresql
|
||
which can report on unique constraints and unique indexes
|
||
separately.
|
||
* Fixed bug where using a partial revision identifier as the
|
||
“starting revision” in --sql mode in a downgrade operation
|
||
would fail to resolve properly.
|
||
- set minimum version for SQLAlchemy to 0.7.6
|
||
- use update-alternatives for alembic binary
|
||
- always run the tests when building the package
|
||
|
||
-------------------------------------------------------------------
|
||
Thu Feb 5 15:04:20 UTC 2015 - tbechtold@suse.com
|
||
|
||
- update to 0.7.4:
|
||
* Repaired issue where a server default specified without text()
|
||
that represented a numeric or floating point (e.g. with decimal
|
||
places) value would fail in the Postgresql-specific check for
|
||
“compare server default”; as PG accepts the value with quotes
|
||
in the table specification, it’s still valid. Pull request
|
||
courtesy Dimitris Theodorou.
|
||
* The rendering of a ForeignKeyConstraint will now ensure that
|
||
the names of the source and target columns are the database-side
|
||
name of each column, and not the value of the .key attribute as
|
||
may be set only on the Python side. This is because Alembic
|
||
generates the DDL for constraints as standalone objects without
|
||
the need to actually refer to an in-Python Table object, so
|
||
there’s no step that would resolve these Python-only key names
|
||
to database column names.
|
||
* Fixed bug in foreign key autogenerate where if the in-Python
|
||
table used custom column keys (e.g. using the key='foo' kwarg
|
||
to Column), the comparison of existing foreign keys to those
|
||
specified in the metadata would fail, as the reflected table
|
||
would not have these keys available which to match up. Foreign
|
||
key comparison for autogenerate now ensures it’s looking at
|
||
the database-side names of the columns in all cases; this
|
||
matches the same functionality within unique constraints and
|
||
indexes.
|
||
* Fixed issue in autogenerate type rendering where types that
|
||
belong to modules that have the name “sqlalchemy” in them would
|
||
be mistaken as being part of the sqlalchemy. namespace. Pull
|
||
req courtesy Bartosz Burclaf.
|
||
|
||
-------------------------------------------------------------------
|
||
Mon Jan 5 10:19:27 UTC 2015 - dmueller@suse.com
|
||
|
||
- update to 0.7.3:
|
||
* Fixed regression in new versioning system where upgrade / history
|
||
operation would fail on AttributeError if no version files were
|
||
present at all.
|
||
* Adjusted the SQLite backend regarding autogen of unique constraints
|
||
to work fully with the current SQLAlchemy 1.0, which now will report
|
||
on UNIQUE constraints that have no name.
|
||
* Fixed bug in batch where if the target table contained multiple
|
||
foreign keys to the same target table, the batch mechanics would
|
||
fail with a "table already exists" error. Thanks for the help
|
||
on this from Lucas Kahlert.
|
||
* Fixed an issue where the MySQL routine to skip foreign-key-implicit
|
||
indexes would also catch unnamed unique indexes, as they would be
|
||
named after the column and look like the FK indexes. Pull request
|
||
courtesy Johannes Erdfelt.
|
||
* Repaired a regression in both the MSSQL and Oracle dialects whereby
|
||
the overridden ``_exec()`` method failed to return a value, as is
|
||
needed now in the 0.7 series.
|
||
* The ``render_as_batch`` flag was inadvertently hardcoded to ``True``,
|
||
so all autogenerates were spitting out batch mode...this has been
|
||
fixed so that batch mode again is only when selected in env.py.
|
||
* Support for autogenerate of FOREIGN KEY constraints has been added.
|
||
These are delivered within the autogenerate process in the same
|
||
manner as UNIQUE constraints, including ``include_object`` support.
|
||
Big thanks to Ann Kamyshnikova for doing the heavy lifting here.
|
||
* Fixed bug where the "source_schema" argument was not correctly passed
|
||
when calling :meth:`.BatchOperations.create_foreign_key`. Pull
|
||
request courtesy Malte Marquarding.
|
||
* The "multiple heads / branches" feature has now landed. This is
|
||
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.
|
||
* Added "move and copy" workflow, where a table to be altered is copied to
|
||
a new one with the new structure and the old one dropped, is now
|
||
implemented for SQLite as well as all database backends in general
|
||
using the new :meth:`.Operations.batch_alter_table` system. This
|
||
directive provides a table-specific operations context which gathers
|
||
column- and constraint-level mutations specific to that table, and
|
||
at the end of the context creates a new table combining the structure
|
||
of the old one with the given changes, copies data from old table to new,
|
||
and finally drops the old table,
|
||
renaming the new one to the existing name. This is required for
|
||
fully featured SQLite migrations, as SQLite has very little support for the
|
||
traditional ALTER directive. The batch directive
|
||
is intended to produce code that is still compatible with other databases,
|
||
in that the "move and copy" process only occurs for SQLite by default,
|
||
while still providing some level of sanity to SQLite's
|
||
requirement by allowing multiple table mutation operations to
|
||
proceed within one "move and copy" as well as providing explicit
|
||
control over when this operation actually occurs. The "move and copy"
|
||
feature may be optionally applied to other backends as well, however
|
||
dealing with referential integrity constraints from other tables must
|
||
still be handled explicitly.
|
||
* Relative revision identifiers as used with ``alembic upgrade``,
|
||
``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.
|
||
|
||
-------------------------------------------------------------------
|
||
Mon Sep 15 05:25:46 UTC 2014 - tbechtold@suse.com
|
||
|
||
- update to version 0.6.7:
|
||
* See
|
||
+ http://alembic.readthedocs.org/en/latest/changelog.html#change-0.6.6
|
||
+ http://alembic.readthedocs.org/en/latest/changelog.html#change-0.6.7
|
||
* Fixed bug in MSSQL dialect where "rename table" wasn't using
|
||
``sp_rename()`` as is required on SQL Server. Pull request courtesy
|
||
* Added support for functional indexes when using the
|
||
: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.
|
||
* A file named ``__init__.py`` in the ``versions/`` directory is now
|
||
ignored by Alembic when the collection of version files is retrieved.
|
||
Pull request courtesy Michael Floering.
|
||
* Fixed Py3K bug where an attempt would be made to sort None against
|
||
string values when autogenerate would detect tables across multiple
|
||
schemas, including the default schema. Pull request courtesy
|
||
paradoxxxzero.
|
||
* Autogenerate render will render the arguments within a Table construct
|
||
using ``*[...]`` when the number of columns/elements is greater than
|
||
255. Pull request courtesy Ryan P. Kelly.
|
||
* Fixed bug where foreign key constraints would fail to render in
|
||
autogenerate when a schema name was present. Pull request courtesy
|
||
Andreas Zeidler.
|
||
* Some deep-in-the-weeds fixes to try to get "server default" comparison
|
||
working better across platforms and expressions, in particular on
|
||
the Postgresql backend, mostly dealing with quoting/not quoting of various
|
||
expressions at the appropriate time and on a per-backend basis.
|
||
Repaired and tested support for such defaults as Postgresql interval
|
||
and array defaults.
|
||
* When a run of Alembic command line fails due to ``CommandError``,
|
||
the output now prefixes the string with ``"FAILED:"``, and the error
|
||
is also written to the log output using ``log.error()``.
|
||
* Liberalized even more the check for MySQL indexes that shouldn't be
|
||
counted in autogenerate as "drops"; this time it's been reported
|
||
that an implicitly created index might be named the same as a composite
|
||
foreign key constraint, and not the actual columns, so we now skip those
|
||
when detected as well.
|
||
* Added a new accessor :attr:`.MigrationContext.config`, when used
|
||
in conjunction with a :class:`.EnvironmentContext` and
|
||
:class:`.Config`, this config will be returned. Patch
|
||
courtesy Marc Abramowitz.
|
||
|
||
-------------------------------------------------------------------
|
||
Thu Jul 24 11:33:27 UTC 2014 - dmueller@suse.com
|
||
|
||
- update to 0.6.5:
|
||
* See http://alembic.readthedocs.org/en/latest/changelog.html#change-0.6.5
|
||
* Added new argument EnvironmentContext.configure.user_module_prefix
|
||
* The ScriptDirectory system that loads migration files from a
|
||
versions/ directory
|
||
* The command.revision() command now returns the Script object
|
||
corresponding to the newly generated revision
|
||
* Added new feature
|
||
EnvironmentContext.configure.transaction_per_migration, which when True
|
||
causes the BEGIN/COMMIT pair to incur for each migration individually
|
||
|
||
-------------------------------------------------------------------
|
||
Mon Jan 13 13:33:57 UTC 2014 - dmueller@suse.com
|
||
|
||
- update to 0.6.2:
|
||
* Expanded the size of the “slug” generated by “revision” to 40 characters,
|
||
which is also configurable by new field truncate_slug_length
|
||
* Support for autogeneration detection and rendering of indexes
|
||
and unique constraints has been added
|
||
* Added new argument mssql_drop_foreign_key to Operations.drop_column()
|
||
* Bugfixes
|
||
|
||
-------------------------------------------------------------------
|
||
Thu Oct 24 10:58:37 UTC 2013 - speilicke@suse.com
|
||
|
||
- Require python-setuptools instead of distribute (upstreams merged)
|
||
|
||
-------------------------------------------------------------------
|
||
Thu Aug 8 20:36:51 UTC 2013 - dmueller@suse.com
|
||
|
||
- update to 0.6.0:
|
||
* [feature] Added new kw argument to EnvironmentContext.configure() include_object.
|
||
* [feature] The output of the alembic history command is now expanded.
|
||
* [feature] Added alembic.config.Config.cmd_opts attribute, allows access to the
|
||
argparse options passed to the alembic runner.(link)
|
||
* [feature] Added new command line argument -x, allows extra arguments to be
|
||
appended to the command line which can be consumed within an env.py script by
|
||
looking at context.config.cmd_opts.x, or more simply a new method
|
||
EnvironmentContext.get_x_argument().(link)
|
||
* [feature] Added -r argument to alembic history command, allows specification of [start]:[end] to view a slice of history.
|
||
* [feature] Source base is now in-place for Python 2.6 through 3.3,
|
||
without the need for 2to3.
|
||
* [feature] Added new kw argument to EnvironmentContext.configure() include_object.
|
||
|
||
-------------------------------------------------------------------
|
||
Sun Apr 14 15:53:22 UTC 2013 - p.drouand@gmail.com
|
||
|
||
- Update to version 0.5.0
|
||
+ added version_table_schema argument to EnvironmentContext.configure(),
|
||
complements the version_table argument to set an optional remote schema
|
||
for the version table.
|
||
+ added output_encoding option to EnvironmentContext.configure(), used with --sql
|
||
mode to apply an encoding to the output stream.
|
||
+ added Operations.create_primary_key() operation, will genenerate an
|
||
ADD CONSTRAINT for a primary key.
|
||
+ upgrade and downgrade commands will list the first line of the docstring
|
||
out next to the version number.
|
||
+ added –head-only option to “alembic current”, will print current version
|
||
plus the symbol “(head)” if this version is the head or not.
|
||
+ the rendering of any construct during autogenerate can be customized, in particular
|
||
to allow special rendering for user-defined column, constraint subclasses, using new render
|
||
_item argument to EnvironmentContext.configure().
|
||
+ fix format of RENAME for table that includes schema with Postgresql; the
|
||
schema name shouldn’t be in the “TO” field.
|
||
+ fix bug whereby double quoting would be applied to target column name during an sp_rename operation.
|
||
+ fix transactional_ddl flag for SQLite, MySQL dialects set to False. MySQL doesn’t support it,
|
||
SQLite does but current pysqlite driver does not.
|
||
+ fix Autogenerate will render additional table keyword arguments like “mysql_engine” and
|
||
others within op.create_table().
|
||
+ fix bug whereby create_index() would include in the constraint columns that are added
|
||
to all Table objects using events, externally to the generation of the constraint.
|
||
This is the same issue that was fixed for unique constraints in version 0.3.2.
|
||
+ fix worked around a backwards-incompatible regression in Python3.3 regarding argparse;
|
||
running “alembic” with no arguments now yields an informative error in py3.3 as with
|
||
all previous versions.
|
||
+ fix host of argument name changes within migration operations for consistency. Keyword
|
||
arguments will continue to work on the old name for backwards compatibility, however required
|
||
positional arguments will not:
|
||
* Operations.alter_column() - name -> new_column_name - old name will work for backwards compatibility.
|
||
* Operations.create_index() - tablename -> table_name - argument is positional.
|
||
* Operations.drop_index() - tablename -> table_name - old name will work for backwards compatibility.
|
||
* Operations.drop_constraint() - tablename -> table_name - argument is positional.
|
||
* Operations.drop_constraint() - type -> type_ - old name will work for backwards compatibility
|
||
+ SQLAlchemy 0.6 is no longer supported by Alembic - minimum version is 0.7.3, full support is as of 0.7.9.
|
||
- Initial python3 support
|
||
|
||
-------------------------------------------------------------------
|
||
Thu Jan 17 12:31:01 UTC 2013 - toddrme2178@gmail.com
|
||
|
||
- Set nose version requirement
|
||
|
||
-------------------------------------------------------------------
|
||
Mon Jan 14 16:02:38 UTC 2013 - saschpe@suse.de
|
||
|
||
- Update to version 0.4.2:
|
||
+ Fixed bug where autogenerate would fail if a Column to be added to
|
||
a table made use of the ".key" paramter.
|
||
+ Added a workaround to setup.py to prevent "NoneType" error from
|
||
occuring when "setup.py test" is run.
|
||
+ Added a README.unittests with instructions for running the test
|
||
suite fully.
|
||
- Changes from version 0.4.1:
|
||
+ Added support for autogenerate render of ForeignKeyConstraint
|
||
options onupdate, ondelete, initially, and deferred.
|
||
+ Explicit error message describing the case when downgrade --sql
|
||
is used without specifying specific start/end versions.
|
||
+ Fixed the minute component in file_template
|
||
which returned the month part of the create date.
|
||
|
||
-------------------------------------------------------------------
|
||
Mon Jan 14 16:00:10 UTC 2013 - saschpe@suse.de
|
||
|
||
- Disable testsuite on SLE
|
||
|
||
-------------------------------------------------------------------
|
||
Fri Nov 23 10:43:42 UTC 2012 - saschpe@suse.de
|
||
|
||
- Update to version 0.4.0:
|
||
+ [feature] Support for tables in alternate schemas
|
||
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.
|
||
+ [feature] The command line runner has been organized
|
||
into a reusable CommandLine object, so that other
|
||
front-ends can re-use the argument parsing built
|
||
in. #70
|
||
+ [feature] Added "stdout" option to Config, provides
|
||
control over where the "print" output of commands like
|
||
"history", "init", "current" etc. are sent. #43
|
||
+ [bug] Fixed the "multidb" template which was badly out
|
||
of date. It now generates revision files using
|
||
the configuration to determine the different
|
||
upgrade_<xyz>() methods needed as well, instead of
|
||
needing to hardcode these. Huge thanks to
|
||
BryceLohr for doing the heavy lifting here. #71
|
||
+ [bug] Fixed the regexp that was checking for .py files
|
||
in the version directory to allow any .py file through.
|
||
Previously it was doing some kind of defensive checking,
|
||
probably from some early notions of how this directory
|
||
works, that was prohibiting various filename patterns
|
||
such as those which begin with numbers. #72
|
||
+ [bug] Fixed MySQL rendering for server_default which
|
||
didn't work if the server_default was a generated
|
||
SQL expression. Courtesy Moriyoshi Koizumi.
|
||
+ [feature] Added support for alteration of MySQL
|
||
columns that have AUTO_INCREMENT, as well as enabling
|
||
this flag. Courtesy Moriyoshi Koizumi.
|
||
|
||
-------------------------------------------------------------------
|
||
Wed Jun 6 12:13:48 UTC 2012 - saschpe@suse.de
|
||
|
||
- Update to version 0.3.4:
|
||
+ [bug] Fixed command-line bug introduced by the
|
||
"revision_environment" feature.
|
||
- Changes from version 0.3.3:
|
||
+ [feature] New config argument
|
||
"revision_environment=true", causes env.py to
|
||
be run unconditionally when the "revision" command
|
||
is run, to support script.py.mako templates with
|
||
dependencies on custom "template_args".
|
||
+ [feature] Added "template_args" option to configure()
|
||
so that an env.py can add additional arguments
|
||
to the template context when running the
|
||
"revision" command. This requires either --autogenerate
|
||
or the configuration directive "revision_environment=true".
|
||
+ [bug] Added "type" argument to op.drop_constraint(),
|
||
and implemented full constraint drop support for
|
||
MySQL. CHECK and undefined raise an error.
|
||
MySQL needs the constraint type
|
||
in order to emit a DROP CONSTRAINT. #44
|
||
+ [feature] Added version_table argument to
|
||
EnvironmentContext.configure(), allowing for the
|
||
configuration of the version table name. #34
|
||
+ [feature] Added support for "relative" migration
|
||
identifiers, i.e. "alembic upgrade +2",
|
||
"alembic downgrade -1". Courtesy
|
||
Atsushi Odagiri for this feature.
|
||
+ [bug] Fixed bug whereby directories inside of
|
||
the template directories, such as __pycache__
|
||
on Pypy, would mistakenly be interpreted as
|
||
files which are part of the template. #49
|
||
|
||
-------------------------------------------------------------------
|
||
Wed May 23 12:55:05 UTC 2012 - saschpe@suse.de
|
||
|
||
- Update to version 0.3.2:
|
||
+ [feature] Basic support for Oracle added
|
||
+ [feature] Added support for UniqueConstraint in autogenerate
|
||
+ [bug] Fixed support of schema-qualified ForeignKey target in column alter operations,
|
||
+ [bug] Fixed bug whereby create_unique_constraint() would include in
|
||
the constraint columns that are added to all Table objects using events,
|
||
externally to the generation of the constraint.
|
||
- Changes from version 0.3.1:
|
||
+ [bug] bulk_insert() fixes:
|
||
1. bulk_insert() operation was not working most likely since the 0.2 series
|
||
when used with an engine
|
||
2. Repaired bulk_insert() to complete when used against a lower-case-t
|
||
table and executing with only one set of parameters, working
|
||
around SQLAlchemy bug #2461 in this regard.
|
||
3. bulk_insert() uses "inline=True" so that phrases like RETURNING and
|
||
such don't get invoked for single-row bulk inserts.
|
||
4. bulk_insert() will check that you're passing a list of dictionaries
|
||
in, raises TypeError if not detected.
|
||
- Changes from version 0.3.0:
|
||
+ [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.
|
||
|
||
-------------------------------------------------------------------
|
||
Wed Mar 7 08:25:45 UTC 2012 - saschpe@suse.de
|
||
|
||
- Initial version
|
||
|