]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/log
thirdparty/sqlalchemy/alembic.git
7 years ago- 0.9.9 rel_0_9_9
Mike Bayer [Thu, 22 Mar 2018 14:06:32 +0000 (10:06 -0400)] 
- 0.9.9

7 years agoEnsure CHECK constraint name is quoted for MySQL
Mike Bayer [Wed, 21 Mar 2018 13:21:58 +0000 (09:21 -0400)] 
Ensure CHECK constraint name is quoted for MySQL

Change-Id: Ib85de299c5f3c2631c64fe30006879ba274fca15
Fixes: #487
7 years agoAdd indicate-current option into history command
misebox [Wed, 7 Mar 2018 21:20:00 +0000 (16:20 -0500)] 
Add indicate-current option into history command

Added new flag ``--indicate-current`` to the ``alembic history`` command.
When listing versions, it will include the token "(current)" to indicate
the given version is a current head in the target database.  Pull request
courtesy Kazutaka Mise.

Fixes: #481
Change-Id: I7daa02b455aaba76c50d0e1febbdc6908693d4c9
Pull-request: https://bitbucket.org/zzzeek/alembic/pull-requests/77

7 years agoMerge "Repair server default comparison for MySQL / MariaDB"
mike bayer [Tue, 20 Feb 2018 01:49:03 +0000 (20:49 -0500)] 
Merge "Repair server default comparison for MySQL / MariaDB"

7 years agoRemove erroneous skip message
Mike Bayer [Mon, 19 Feb 2018 21:43:22 +0000 (16:43 -0500)] 
Remove erroneous skip message

The logic here seems to try to say something different when
__backend__ is True but it produces a nonsensical message,
since __only_on__ doesn't tell us about the implementation
we are actually running.

Cross-ported from SQLAlchemy, same change id.

Change-Id: I14e20cadcba975f8efe8fdefa439c8b8c480b3ed

7 years agoRepair server default comparison for MySQL / MariaDB
Mike Bayer [Mon, 19 Feb 2018 19:00:11 +0000 (14:00 -0500)] 
Repair server default comparison for MySQL / MariaDB

The regexp for comparing the TIMESTAMP function
was obliterating all other comparisons as it was incorrect.
Add new regexp for integers that also adjusts for
mariadb 10.2 quoting differences vs. mariadb 10.1

Change-Id: I7bdaceb7e0dbe06bc2c3690cd5dd8e737716278c
Fixes: #455
Fixes: #483
7 years agofix formatting
Mike Bayer [Fri, 16 Feb 2018 20:59:59 +0000 (15:59 -0500)] 
fix formatting

Change-Id: Ic4c59c780f4b5ac094602305b544c5e3866cbe58

7 years agoVersion 0.9.9 placeholder
Mike Bayer [Fri, 16 Feb 2018 20:57:58 +0000 (15:57 -0500)] 
Version 0.9.9 placeholder

7 years ago- 0.9.8 rel_0_9_8
Mike Bayer [Fri, 16 Feb 2018 20:55:11 +0000 (15:55 -0500)] 
- 0.9.8

7 years agoRepair as_revision_number to return a tuple for "heads"
Mike Bayer [Fri, 16 Feb 2018 15:07:20 +0000 (10:07 -0500)] 
Repair as_revision_number to return a tuple for "heads"

Fixed bug where the :meth:`.Script.as_revision_number` method
did not accommodate for the 'heads' identifier, which in turn
caused the :meth:`.EnvironmentContext.get_head_revisions`
and :meth:`.EnvironmentContext.get_revision_argument` methods
to be not usable when multiple heads were present.
The :meth:.`EnvironmentContext.get_head_revisions` method returns
a tuple in all cases as documented.

Change-Id: I085d9b6c3f4ceafd6828d24983768a3d3916ce00
Fixes: #482
7 years agoMerge branch 'zifot/fix-typo-in-the-autogenerate-api-docs-1517256405542' of https...
Mike Bayer [Wed, 14 Feb 2018 16:30:10 +0000 (11:30 -0500)] 
Merge branch 'zifot/fix-typo-in-the-autogenerate-api-docs-1517256405542' of https://bitbucket.org/zifot/alembic into prfoo

7 years agoAdd Python docs to intersphinx_mapping
Mark Amery [Sun, 7 Jan 2018 12:22:52 +0000 (12:22 +0000)] 
Add Python docs to intersphinx_mapping

This allows refs like the ConfigParser one at
http://alembic.zzzcomputing.com/en/latest/tutorial.html
to automatically get turned into links, and suppresses
the warning about them not being found when running 'make html'

(cherry picked from commit 49f0da899284f3ab9b1dc27c283619762b760e2c)

Change-Id: Idf9fce72894bac0ab7b717cc864c8c636cc27b2d

7 years agoChange (broken) declarative base link into (working) ref
Mark Amery [Sun, 7 Jan 2018 12:13:15 +0000 (12:13 +0000)] 
Change (broken) declarative base link into (working) ref

(cherry picked from commit 7dfa693afdba75dfe5094cf39b2c74958ef3153e)

7 years agoFix typo in the autogenerate api docs
zifot [Mon, 29 Jan 2018 20:06:53 +0000 (20:06 +0000)] 
Fix typo in the autogenerate api docs

7 years agoAdd HSTORE to render_type_w_subtype
Mike Bayer [Fri, 26 Jan 2018 15:02:16 +0000 (10:02 -0500)] 
Add HSTORE to render_type_w_subtype

Fixed the autogenerate of the module prefix
when rendering the text_type parameter of
postgresql.HSTORE, in much the same way that
we do for ARRAY's type and JSON's text_type.

Change-Id: Ie8c2cdd1f4aeebcbb306c7f74168f8ac33688b1a
Fixes: #480
7 years agoMerge "Detect indexes for table that's dropped"
mike bayer [Wed, 24 Jan 2018 21:50:43 +0000 (16:50 -0500)] 
Merge "Detect indexes for table that's dropped"

7 years agoDetect indexes for table that's dropped
Mike Bayer [Tue, 23 Jan 2018 17:38:28 +0000 (12:38 -0500)] 
Detect indexes for table that's dropped

Fixed bug where the indexes would not be included in a
migration that was dropping the owning table.   The fix
now will also emit DROP INDEX for the indexes ahead of time,
but more importantly will include CREATE INDEX in the
downgrade migration.

Change-Id: I15852bf1cca6de26dd6e7e5ede69bc9e2145c5c0
Fixes: #468
7 years agoMerge "Add DROP CONSTRAINT to MySQL for mariadb"
mike bayer [Tue, 23 Jan 2018 23:08:39 +0000 (18:08 -0500)] 
Merge "Add DROP CONSTRAINT to MySQL for mariadb"

7 years agoAdd DROP CONSTRAINT to MySQL for mariadb
Mike Bayer [Tue, 23 Jan 2018 22:33:49 +0000 (17:33 -0500)] 
Add DROP CONSTRAINT to MySQL for mariadb

Added support for DROP CONSTRAINT to the MySQL Alembic
dialect to support MariaDB 10.2 which now has real
CHECK constraints.  Note this change does **not**
add autogenerate support, only support for op.drop_constraint()
to work.

Change-Id: I15b2425a44e4559b047b61573117fca9a46c8be3
Fixes: #479
7 years agoRender ExcludeContraint Column as column, not plain string
Mike Bayer [Mon, 22 Jan 2018 19:40:23 +0000 (14:40 -0500)] 
Render ExcludeContraint Column as column, not plain string

Fixed bug where autogenerate of :class:`.ExcludeConstraint`
would render a raw quoted name for a Column that has case-sensitive
characters, which when invoked as an inline member of the Table
would produce a stack trace that the quoted name is not found.
An incoming Column object is now rendered as ``sa.column('name')``.

Change-Id: Ic84fc0b0fbaa5816ece1944043cd01a653bfe4ce
Fixes: #478
7 years agoVersion 0.9.8 placeholder
Mike Bayer [Tue, 16 Jan 2018 17:53:26 +0000 (12:53 -0500)] 
Version 0.9.8 placeholder

Change-Id: I756e389bbb336a75a2b2f79d3c8ee91523e1f744

7 years ago- 0.9.7 rel_0_9_7
Mike Bayer [Tue, 16 Jan 2018 17:47:02 +0000 (12:47 -0500)] 
- 0.9.7

7 years ago- update copyright in conf.py
Mike Bayer [Mon, 15 Jan 2018 14:24:14 +0000 (09:24 -0500)] 
- update copyright in conf.py

Change-Id: I47cf0fcbed60fc1afd2df9e05d2b54e618acc764

7 years agohappy new year
Mike Bayer [Fri, 12 Jan 2018 19:25:55 +0000 (14:25 -0500)] 
happy new year

Change-Id: Ic000451eba8d1f1b81c2e6b6deef920d65ceab38

7 years agoMerged in ExplodingCabbage/alembic/add-missing-ignores (pull request #74)
Mark Amery [Fri, 12 Jan 2018 15:01:54 +0000 (15:01 +0000)] 
Merged in ExplodingCabbage/alembic/add-missing-ignores (pull request #74)

Ignore files created by running tox

7 years agoIgnore files created by running tox
Mark Amery [Sun, 7 Jan 2018 11:44:56 +0000 (11:44 +0000)] 
Ignore files created by running tox

7 years agoMerge "Disable index quoting when applying truncated DDL rules"
mike bayer [Thu, 4 Jan 2018 00:44:37 +0000 (19:44 -0500)] 
Merge "Disable index quoting when applying truncated DDL rules"

7 years agoDisable index quoting when applying truncated DDL rules
Mike Bayer [Tue, 2 Jan 2018 22:10:43 +0000 (17:10 -0500)] 
Disable index quoting when applying truncated DDL rules

Fixed regression caused by :ticket:`421` which would
cause case-sensitive quoting rules to interfere with the
comparison logic for index names, thus causing indexes to show
as added for indexes that have case-sensitive names.

Change-Id: Ibd73456109cc95362503576f379acd9f4f0d6d65
Fixes: #472
7 years ago- turn off troublesome pytest plugins
Mike Bayer [Wed, 3 Jan 2018 15:37:21 +0000 (10:37 -0500)] 
- turn off troublesome pytest plugins

Change-Id: Ia08a012647fdaf36925af0ee61124dd8f1f2651a

7 years agoAdd cookbook recipe for don't render DROP INDEX
Mike Bayer [Tue, 28 Nov 2017 17:10:39 +0000 (12:10 -0500)] 
Add cookbook recipe for don't render DROP INDEX

Filters out DropIndexOp when there is a corresponding
DropTableOp.

Change-Id: I7baadf6e5b9f669c875aeeaccefb19cb5e105953
Fixes: #467
7 years agoMerge pull request #42 from russellballestrini/patch-1
mike bayer [Tue, 31 Oct 2017 15:31:20 +0000 (11:31 -0400)] 
Merge pull request #42 from russellballestrini/patch-1

Update naming.rst

7 years agotrack 0.9.7 notes
Mike Bayer [Fri, 27 Oct 2017 18:16:46 +0000 (14:16 -0400)] 
track 0.9.7 notes

Change-Id: Idbf1383da9a575f29aa37ab02fc242f13c91332e

7 years agoResolve Postgresql implicit indexes via duplicates_constraint
Mike Bayer [Wed, 25 Oct 2017 19:24:29 +0000 (15:24 -0400)] 
Resolve Postgresql implicit indexes via duplicates_constraint

Fixed bug where autogenerate would produce a DROP statement for the index
implicitly created by a Postgresql EXCLUDE constraint, rather than skipping
it as is the case for indexes implicitly generated by unique constraints.
Makes use of SQLAlchemy 1.0.x's improved "duplicates index" metadata and
requires at least SQLAlchemy version 1.0.x to function correctly.

Change-Id: I7362c8045f69553c6090dd3cb236569b0c9b1e67
Fixes: #461
7 years agoUpdate naming.rst
Russell Ballestrini [Tue, 24 Oct 2017 04:51:54 +0000 (00:51 -0400)] 
Update naming.rst

Consistent quotes. I'm going to make the same PR to the alembic docs.

I made similar change here: https://github.com/Pylons/pyramid-cookiecutter-alchemy/pull/23

7 years ago- 0.9.6 rel_0_9_6
Mike Bayer [Fri, 13 Oct 2017 15:17:07 +0000 (11:17 -0400)] 
- 0.9.6

7 years agoClean up all Python 3.6 warnings
Mike Bayer [Wed, 11 Oct 2017 21:17:19 +0000 (17:17 -0400)] 
Clean up all Python 3.6 warnings

Fixed a few Python3.6 deprecation warnings by replacing ``StopIteration``
with ``return``, as well as using ``getfullargspec()`` instead of
``getargspec()`` under Python 3.

Additionally fixed docstrings with backslashes needing r'', filehandles
not explicitly closed, accommodate for .pyc files not necessarily present.

Change-Id: Id9791c5fa8b4b1f3e4e36f237a8a8ebcef4aaaba
Fixes: #458
7 years agoMerge "Append table name to batch temp name"
mike bayer [Wed, 11 Oct 2017 20:53:25 +0000 (16:53 -0400)] 
Merge "Append table name to batch temp name"

7 years agoClean up _fk_colspec() for link_to_name, no column found
Mike Bayer [Wed, 11 Oct 2017 13:53:22 +0000 (09:53 -0400)] 
Clean up _fk_colspec() for link_to_name, no column found

A :class:`.ForeignKeyConstraint` can now render correctly if the
``link_to_name`` flag is set, as it will not attempt to resolve the name
from a "key" in this case.  Additionally, the constraint will render
as-is even if the remote column name isn't present on the referenced
remote table.

Change-Id: Ic030fbc106973231b6877c1acfb5349e515335a8
Fixes: #456
7 years agoAppend table name to batch temp name
Mike Bayer [Wed, 11 Oct 2017 14:08:19 +0000 (10:08 -0400)] 
Append table name to batch temp name

The name of the temporary table in batch mode is now generated
off of the original table name itself, to avoid conflicts for the
unusual case of multiple batch operations running against the same
database schema at the same time.

Change-Id: Idbeabf9558887d3f5525e7045d5de33bab6805a5
Fixes: #457
7 years ago- keep tuning this mariadb check constraint limitation
Mike Bayer [Sun, 8 Oct 2017 22:53:08 +0000 (18:53 -0400)] 
- keep tuning this mariadb check constraint limitation

Change-Id: I738fbd48a49e78e7103caad5872d592c0691e694

7 years ago- more mariadb 10.2 tests that won't work
Mike Bayer [Fri, 6 Oct 2017 20:31:09 +0000 (16:31 -0400)] 
- more mariadb 10.2 tests that won't work

Change-Id: I7484c653e5f90adb0b25cb74263c99d7bfec5be0

7 years ago- still attempt to exclude mariadb 10.2 from this test for older
Mike Bayer [Fri, 6 Oct 2017 19:03:21 +0000 (15:03 -0400)] 
- still attempt to exclude mariadb 10.2 from this test for older
SQLAlchemy versions

Change-Id: I38aaa14cae326206f4d2c0f22150336957187de7

7 years agoAccommodate for mariadb 10.2 function reflection style
Mike Bayer [Wed, 4 Oct 2017 20:01:33 +0000 (16:01 -0400)] 
Accommodate for mariadb 10.2 function reflection style

Fixed bug where server default comparison of CURRENT_TIMESTAMP would fail
on MariaDB 10.2 due to a change in how the function is
represented by the database during reflection.

Also implement mariadb 10.2 checks from SQLAlchemy to skip
other CHECK contraint related tests that can't pass.

Change-Id: Id77b527d3215d06e2f44a6cddeb77583e5b39101
Fixes: #455
7 years agoFix flake8 E265 violation in multidb env.py template
Peter Marsh [Sun, 24 Sep 2017 15:35:20 +0000 (16:35 +0100)] 
Fix flake8 E265 violation in multidb env.py template

flake8 detected the following violation in env.py for multidb
projects:

    multidb/env.py:34:1: E265 block comment should start with '# '
    #}
    ^

This fixes the violation in the template, so fresh multidb projects
will no longer have this violation.

7 years agoMerge "Use bitbucket for SQLA branch"
mike bayer [Thu, 21 Sep 2017 15:57:14 +0000 (11:57 -0400)] 
Merge "Use bitbucket for SQLA branch"

7 years agoUse bitbucket for SQLA branch
Mike Bayer [Thu, 21 Sep 2017 15:03:23 +0000 (11:03 -0400)] 
Use bitbucket for SQLA branch

git.sqlalchemy.org is retired for now, consume from bitbucket

Change-Id: I1501528d6856985965feede1f2a05e1488c50382

7 years agoAdd + to illegal revision characters list
Mike Bayer [Sat, 16 Sep 2017 00:25:43 +0000 (20:25 -0400)] 
Add + to illegal revision characters list

An addition to :ticket:`441` fixed in 0.9.5, we forgot to also filter
for the ``+`` sign in migration names which also breaks due to the relative
migrations feature.

Change-Id: I94d3882e84ba13e7569b47230dc9422a8ac6408c
Fixes: #445
7 years agoSupport pep3149, latest import mechanics, fully
Mike Bayer [Thu, 7 Sep 2017 21:43:00 +0000 (17:43 -0400)] 
Support pep3149, latest import mechanics, fully

Reworked "sourceless" system to be fully capable of handling any
combination of: Python2/3x, pep3149 or not, PYTHONOPTIMIZE or not,
for locating and loading both env.py files as well as versioning files.
This includes: locating files inside of ``__pycache__`` as well as listing
out version files that might be only in ``versions/__pycache__``, deduplicating
version files that may be in ``versions/__pycache__`` and ``versions/``
at the same time, correctly looking for .pyc or .pyo files based on
if pep488 is present or not. The latest Python3x deprecation warnings
involving importlib are also corrected.

Change-Id: I2495e793c81846d3f05620dbececb18973dd8a8f
Fixes: #449
7 years ago- fix py26 syntax error
Mike Bayer [Fri, 8 Sep 2017 15:56:00 +0000 (11:56 -0400)] 
- fix py26 syntax error

Change-Id: I897525e0f1ea0ec2cbaec293bac51dc057dddf87

7 years agoUse env in history when revision_history=true
Mike Bayer [Wed, 6 Sep 2017 14:20:39 +0000 (10:20 -0400)] 
Use env in history when revision_history=true

The ``alembic history`` command will now make use of the revision
environment ``env.py`` unconditionally if the ``revision_environment``
configuration flag is set to True.  Previously, the environment would
only be invoked if the history specification were against a database-stored
revision token.

Change-Id: I2f9dc2554c8a4523f93248859587e8e276fe4d4a
Fixes: #447
7 years agoset native boolean to false on the dialect for the schematype tests
Mike Bayer [Thu, 31 Aug 2017 02:32:50 +0000 (22:32 -0400)] 
set native boolean to false on the dialect for the schematype tests

mssql in 1.2 now does native boolean
by default which is not what this test looks for

Change-Id: I26a21195efaad3bcce6cc09fd98a6d3ce6e9a029

7 years agoDon't compare scale if Numeric has no precision
pg3-ivan [Fri, 25 Aug 2017 14:02:31 +0000 (10:02 -0400)] 
Don't compare scale if Numeric has no precision

Fixed bug where comparison of ``Numeric`` types would produce
a difference if the Python-side ``Numeric`` inadvertently specified
a non-None "scale" with a "precision" of None, even though this ``Numeric``
type will pass over the "scale" argument when rendering. Pull request
courtesy Ivan Mmelnychuk.

Change-Id: I0a676e01579fdf6802bf53ea7f9238003da98847
Pull-request: https://bitbucket.org/zzzeek/alembic/pull-requests/70

7 years ago- merge latest CI options from SQLAlchemy
Mike Bayer [Tue, 22 Aug 2017 17:31:29 +0000 (13:31 -0400)] 
- merge latest CI options from SQLAlchemy

Change-Id: Ia84a7f0779260874137e8d1b3a14b4f6e4778752

7 years ago- santitize brackets / periods from classnames for junitxml
Mike Bayer [Mon, 21 Aug 2017 21:16:47 +0000 (17:16 -0400)] 
- santitize brackets / periods from classnames for junitxml

Change-Id: I1071bd70fd4166937b07536725f0900cba03d86b

7 years agoEnable multi-backend / driver in tests
Mike Bayer [Mon, 21 Aug 2017 20:43:05 +0000 (16:43 -0400)] 
Enable multi-backend / driver in tests

Turn on __backend__ everywhere we can.  Also try removing two worker
limitaiton on oracle.

Change-Id: Ib16ebbd9f9ae35893a74cbf823444d2cc4c731f0

7 years ago- dont use sitepackages
Mike Bayer [Mon, 21 Aug 2017 16:25:26 +0000 (12:25 -0400)] 
- dont use sitepackages
- only need usedevelop for coverage case

Change-Id: Icba6d9f500e206c39a7d2d0ed77e82ad9ad3784d

7 years ago- since non-oracle urls are written, filter on just
Mike Bayer [Mon, 21 Aug 2017 16:06:44 +0000 (12:06 -0400)] 
- since non-oracle urls are written, filter on just
the oracle urls for the DB dropper

Change-Id: I1835c1b312a21a48657d89a84ed1041d6d5ebd73

7 years ago- merge new CI support from SQLAlchemy including
Mike Bayer [Mon, 21 Aug 2017 15:20:13 +0000 (11:20 -0400)] 
- merge new CI support from SQLAlchemy including
multi-backend per dialect and oracle support

7 years ago- support pymysql for tests
Mike Bayer [Sat, 19 Aug 2017 22:42:20 +0000 (18:42 -0400)] 
- support pymysql for tests

Change-Id: Ibb13314a5a55733f7bd56a4fc9ac43bc04c97ac7

7 years ago- add new TOX_ control variables for CI
Mike Bayer [Sat, 19 Aug 2017 21:20:37 +0000 (17:20 -0400)] 
- add new TOX_ control variables for CI

Change-Id: Id6a417911623ea810af605eb0f73851184cf7dbe

7 years agoAdd generic per-type rendering, implement ARRAY
Mike Bayer [Wed, 16 Aug 2017 14:26:16 +0000 (10:26 -0400)] 
Add generic per-type rendering, implement ARRAY

Fixed bug expanding upon the fix for
:ticket:`85` which adds the correct module import to the
"inner" type for an ``ARRAY`` type, the fix now accommodates for the
generic ``sqlalchemy.types.ARRAY`` type added in SQLAlchemy 1.1,
rendering the inner type correctly regardless of whether or not the
Postgresql dialect is present.

Change-Id: I98ffbf95a88dc815404a2d1020b0e3e56742ca8c
Fixes: #442
7 years ago- add 0.9.6 changelog placeholder
Mike Bayer [Wed, 16 Aug 2017 13:41:28 +0000 (09:41 -0400)] 
- add 0.9.6 changelog placeholder

Change-Id: Icb63e42c369d1e61582b767c650d44f55518892e

7 years agounblock pytest-xdist, add sqla master
Mike Bayer [Wed, 9 Aug 2017 18:56:33 +0000 (14:56 -0400)] 
unblock pytest-xdist, add sqla master

Change-Id: I8e150e5e4de50c9819c97ab2b3960c1eb9c0ebd1

7 years ago- 0.9.5 rel_0_9_5
Mike Bayer [Wed, 9 Aug 2017 14:11:07 +0000 (10:11 -0400)] 
- 0.9.5

7 years agofix using tzdata-compliant time zone names
Nils Philippsen [Wed, 9 Aug 2017 13:34:45 +0000 (09:34 -0400)] 
fix using tzdata-compliant time zone names

Previously, time zone names were capitalized indiscriminately, making it
impossible to use names containing lowercase characters with Alembic.

https://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones

Change-Id: I89288447f91e98dc106d82a1ee233f2f3de30c78
Pull-request: https://bitbucket.org/zzzeek/alembic/pull-requests/69

8 years agoMerge "Raise if manual revision id contains dashes or at signs"
mike bayer [Fri, 4 Aug 2017 18:33:34 +0000 (14:33 -0400)] 
Merge "Raise if manual revision id contains dashes or at signs"

8 years agoRaise if manual revision id contains dashes or at signs
Mike Bayer [Fri, 4 Aug 2017 17:28:56 +0000 (13:28 -0400)] 
Raise if manual revision id contains dashes or at signs

A :class:`.CommandError` is raised if the "--rev-id" passed to the
:func:`.revision` command contains dashes or at-signs, as this interferes
with the command notation used to locate revisions.

Change-Id: I60a794a5c80bf47b149998b8c5cb04ecbfd05bfa
Fixes: #441
8 years agoAdd support for kw to DROP INDEX, test postgresql_concurrently
Mike Bayer [Thu, 3 Aug 2017 19:31:17 +0000 (15:31 -0400)] 
Add support for kw to DROP INDEX, test postgresql_concurrently

Change-Id: I89c98401d3e1f1252041b622e045c6dc85fa59a1
Fixes: #424
8 years agoPin to pytest<=3.0.7 pytest-xdist<=1.16.0
Mike Bayer [Fri, 4 Aug 2017 14:01:27 +0000 (10:01 -0400)] 
Pin to pytest<=3.0.7 pytest-xdist<=1.16.0

Until https://github.com/pytest-dev/pytest-xdist/issues/196 is fixed

Change-Id: I35004dd8bea240b7d91d72f2ea86cb732fe861e0

8 years ago- 0.9.5. setup
Mike Bayer [Thu, 3 Aug 2017 19:24:28 +0000 (15:24 -0400)] 
- 0.9.5. setup
- changelog file setup

Change-Id: I1edd9e055740c9826c4f89d6d74fb12f5e3f58ce

8 years ago- 0.9.4 rel_0_9_4
Mike Bayer [Tue, 1 Aug 2017 02:06:28 +0000 (22:06 -0400)] 
- 0.9.4

8 years agoaddress stamp issues in on_version_apply callback
jpassaro [Mon, 10 Jul 2017 19:51:46 +0000 (15:51 -0400)] 
address stamp issues in on_version_apply callback

* add callback tests with stamp present
* fix bug in stamp MigrationInfo construction
* adjust MigrationInfo API to reflect existence of stamps with multiple
  up revisions

Change-Id: I308d1de7854542d4d12bcc743bb5ed7e8e2fbefc
Pull-request: https://bitbucket.org/zzzeek/alembic/pull-requests/68

8 years ago- 0.9.4 setup
Mike Bayer [Mon, 17 Jul 2017 14:33:25 +0000 (10:33 -0400)] 
- 0.9.4 setup

Change-Id: Id951f3ff26b34a03a519b634d1cd7cbf0223f849

8 years ago- 0.9.3 rel_0_9_3
Mike Bayer [Thu, 6 Jul 2017 15:59:21 +0000 (11:59 -0400)] 
- 0.9.3

8 years ago- fix some sphinx link stuff
Mike Bayer [Thu, 6 Jul 2017 15:59:04 +0000 (11:59 -0400)] 
- fix some sphinx link stuff

8 years agoexpose on_version_apply callback to context users
John Passaro [Tue, 27 Jun 2017 18:36:11 +0000 (14:36 -0400)] 
expose on_version_apply callback to context users

Change-Id: I694e26f7d161dcaf4f035277c8317ff6ffe41680
Pull-request: https://bitbucket.org/zzzeek/alembic/pull-requests/67

8 years agoAdjust for Variant returning itself as impl
Mike Bayer [Fri, 2 Jun 2017 14:20:27 +0000 (10:20 -0400)] 
Adjust for Variant returning itself as impl

Fixed bug where autogen comparison of a :class:`.Variant` datatype
would not compare to the dialect level type for the "default"
implementation of the :class:`.Variant`, returning the type as changed
between database and table metadata.

Change-Id: Ie94779ece9f1c768375cdbdc4124c98f9c11bb86
Fixes: #433
8 years ago - add dateutil to docs requirements so that all autodoc
Mike Bayer [Thu, 1 Jun 2017 14:59:33 +0000 (10:59 -0400)] 
 - add dateutil to docs requirements so that all autodoc
modules can import

Change-Id: I9f9943bfa99ac2581cd1579549a533eddefdc191

8 years ago- Fixed unit tests to run correctly under the SQLAlchemy 1.0.x series
Mike Bayer [Wed, 31 May 2017 21:12:41 +0000 (17:12 -0400)] 
- Fixed unit tests to run correctly under the SQLAlchemy 1.0.x series
prior to version 1.0.10 where a particular bug involving Postgresql
exclude constraints was fixed.

Change-Id: Ief64b19b75e4c2c3661ac95d5b03d0c8e0fe5619
Fixes: #431
8 years ago- 0.9.3 setup
Mike Bayer [Wed, 31 May 2017 21:11:09 +0000 (17:11 -0400)] 
- 0.9.3 setup

Change-Id: I151d45645826badad0d398d5178a468f50fb8234

8 years ago- 0.9.2 rel_0_9_2
Mike Bayer [Thu, 18 May 2017 15:04:28 +0000 (11:04 -0400)] 
- 0.9.2

8 years agoDon't use schema with second argument, SQL Server sp_rename
Mike Bayer [Thu, 18 May 2017 14:36:13 +0000 (10:36 -0400)] 
Don't use schema with second argument, SQL Server sp_rename

Repaired :meth:`.Operations.rename_table` for SQL Server when the
target table is in a remote schema, the schema name is omitted from
the "new name" argument.

Also added some extra tests for sp_rename w/ quoting / case sensitive
names.

Change-Id: I411b32d0c5bba5a466c0b5d6a412c1b7541fdc95
Fixes: #429
8 years agoAdd timezone option to config
Mike Bayer [Thu, 6 Apr 2017 17:55:35 +0000 (13:55 -0400)] 
Add timezone option to config

Using dateutil.tz to link string names to tzinfo objects,
the create_date can now generate using a named timezone
rather than datetime.now().

Change-Id: I9f151cb9e11da3d68be63d7141f60e7eccb9812c
Fixes: #425
8 years agoApply DDLCompiler name rules to Index for autogenerate
Mike Bayer [Wed, 15 Mar 2017 21:10:28 +0000 (17:10 -0400)] 
Apply DDLCompiler name rules to Index for autogenerate

The autogenerate compare scheme now takes into account the name truncation
rules applied by SQLAlchemy's DDL compiler to the names of the
:class:`.Index` object, when these names are dynamically truncated
due to a too-long identifier name.   As the identifier truncation is
deterministic, applying the same rule to the metadata name allows
correct comparison to the database-derived name.

Change-Id: I270fbde4430a41f4bcc7857f1932347d86f07675
Fixes: #421
8 years ago- fix the import here
Mike Bayer [Wed, 15 Mar 2017 21:09:24 +0000 (17:09 -0400)] 
- fix the import here

Change-Id: I63fa57218fcc8f3d15c213c8adf61c9761cb9764

8 years ago- add custom css also
Mike Bayer [Wed, 15 Mar 2017 16:06:15 +0000 (12:06 -0400)] 
- add custom css also

Change-Id: I163f3f644e88460cdb5203e8a55944436c06d00b

8 years ago- add custom sidebar file
Mike Bayer [Wed, 15 Mar 2017 15:54:55 +0000 (11:54 -0400)] 
- add custom sidebar file

Change-Id: I03078ee419882942a5891c90cef18851b53f905b

8 years agoWarn on non-Connection present and accommodate for Engine
Mike Bayer [Sat, 4 Mar 2017 21:42:30 +0000 (16:42 -0500)] 
Warn on non-Connection present and accommodate for Engine

A warning is emitted when an object that's not a
:class:`~sqlalchemy.engine.Connection` is passed to
:meth:`.EnvironmentContext.configure`.  For the case of a
:class:`~sqlalchemy.engine.Engine` passed, the check for "in transaction"
introduced in version 0.9.0 has been relaxed to work in the case of an
attribute error, as some users appear to be passing an
:class:`~sqlalchemy.engine.Engine` and not a
:class:`~sqlalchemy.engine.Connection`.

Change-Id: I95ef38955c00511d3055362a03284fb91677595f
Fixes: #419
8 years ago- 0.9.2 setup
Mike Bayer [Sat, 4 Mar 2017 21:43:10 +0000 (16:43 -0500)] 
- 0.9.2 setup

Change-Id: I4459aeef0028c89ac1c30e79cbceefe3b0c27f64

8 years ago- 0.9.1 rel_0_9_1
Mike Bayer [Wed, 1 Mar 2017 16:51:34 +0000 (11:51 -0500)] 
- 0.9.1

8 years agoDon't raise on open transaction if we already started in one
Mike Bayer [Wed, 1 Mar 2017 06:14:50 +0000 (01:14 -0500)] 
Don't raise on open transaction if we already started in one

An adjustment to the bug fix for :ticket:`369` to accommodate for
env.py scripts that use an enclosing transaction distinct from the
one that the context provides, so that the check for "didn't commit
the transaction" doesn't trigger in this scenario.

Change-Id: I3c1fa614495b61532999a84b2af3773e4d33c30b
Fixes: #417
8 years ago- setup for 0.9.1
Mike Bayer [Wed, 1 Mar 2017 06:03:12 +0000 (01:03 -0500)] 
- setup for 0.9.1

Change-Id: I84fa995b7c029404988f04df4fa1460c4409c7da

8 years ago- 0.9.0 rel_0_9_0
Mike Bayer [Tue, 28 Feb 2017 15:58:48 +0000 (10:58 -0500)] 
- 0.9.0

8 years ago- provide param docstrings for all of command
Mike Bayer [Mon, 27 Feb 2017 20:57:33 +0000 (15:57 -0500)] 
- provide param docstrings for all of command
- add cross-linking for process_revision_directives

Change-Id: I88914df056d720207c781501934893ec8e030610

8 years agoAllow target_metadata to be a sequence
Mike Bayer [Thu, 23 Feb 2017 17:57:40 +0000 (12:57 -0500)] 
Allow target_metadata to be a sequence

The :paramref:`.EnvironmentContext.configure.target_metadata` parameter
may now be optionally specified as a sequence of :class:`.MetaData`
objects instead of a single :class:`.MetaData` object.  The
autogenerate process will process the sequence of :class:`.MetaData`
objects in order.

Change-Id: I6485c05d68219ff7af1611b34550487d316e0242
Fixes: #38
8 years agoDetect open transaction at end of migration w/ transactional_ddl=False
Mike Bayer [Thu, 23 Feb 2017 16:18:57 +0000 (11:18 -0500)] 
Detect open transaction at end of migration w/ transactional_ddl=False

A :class:`.CommandError` is now raised when a migration file opens
a database transaction and does not close/commit/rollback, when
the backend database or environment options also specify transactional_ddl
is False.   When transactional_ddl is not in use, Alembic doesn't
close any transaction so a transaction opened by a migration file
will cause the following migrations to fail to apply.

Change-Id: I7a9baf18837deb193d9ddc6813955909484d4945
Fixes: #369
8 years agoApply subtype repr logic to JSON/JSONB
Mike Bayer [Wed, 22 Feb 2017 21:59:09 +0000 (16:59 -0500)] 
Apply subtype repr logic to JSON/JSONB

Fixed bug where Postgresql JSON/JSONB types rendered on SQLAlchemy
1.1 would render the "astext_type" argument which defaults to
the ``Text()`` type without the module prefix, similarly to the
issue with ARRAY fixed in :ticket:`85`.

Also modifies the ARRAY approach from :ticket:`85` to be
regular expression based for safer targeting of the inner
repr() type.

Change-Id: I66d51301f4bf5b747b5e8da26a83cbff075d71b2
Fixes: #411
8 years agoMerge "Add ExcludeConstraint support for Postgresql"
mike bayer [Wed, 22 Feb 2017 22:35:37 +0000 (17:35 -0500)] 
Merge "Add ExcludeConstraint support for Postgresql"

8 years agoAdd ExcludeConstraint support for Postgresql
Mike Bayer [Mon, 20 Feb 2017 21:54:07 +0000 (16:54 -0500)] 
Add ExcludeConstraint support for Postgresql

Add full support for Postgresql add_exclude_constraint().
This opens up more of the operations API and serves as a
model for other dialect-specific constraints.

Additionally, gracefully degrade if a given constraint
class is not supported with a warning.

Fixes: #412
Change-Id: I0fb89c840518aaeae97929919356f944479bc756

8 years agoDetect and render autoincrement for alter_column()
Mike Bayer [Wed, 22 Feb 2017 17:51:53 +0000 (12:51 -0500)] 
Detect and render autoincrement for alter_column()

The ``autoincrement=True`` flag is now rendered within the
:meth:`.Operations.alter_column` operation if the source column indicates
that this flag should be set to True.  The behavior is sensitive to
the SQLAlchemy version in place, as the "auto" default option is new
in SQLAlchemy 1.1.  When the source column indicates autoincrement
as True or "auto", the flag will render as True if the original column
contextually indicates that it should have "autoincrement" keywords,
and when the source column explcitly sets it to False, this is also
rendered.  The behavior is intended to preserve the AUTO_INCREMENT flag
on MySQL as the column is fully recreated on this backend.  Note that this
flag does **not** support alteration of a column's "autoincrement" status,
as this is not portable across backends.

Change-Id: I746c4841752adf9342bfdca7c9255aae5110b2ef
Fixes: #413