]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/log
thirdparty/sqlalchemy/alembic.git
6 years agoAdd special handling for SQL Server create_index mssql_includes
Mike Bayer [Fri, 19 Oct 2018 14:00:50 +0000 (10:00 -0400)] 
Add special handling for SQL Server create_index mssql_includes

Fixed issue where usage of the SQL Server ``mssql_include`` option within a
:meth:`.Operations.create_index` would raise a KeyError, as the additional
column(s) need to be added to the table object used by the construct
internally.

Change-Id: If58fa35b9db8af473a9654e5a2c8861741810511
Fixes: #513
6 years agoblock py.test 3.9.1
Mike Bayer [Wed, 17 Oct 2018 19:44:00 +0000 (15:44 -0400)] 
block py.test 3.9.1

references:

https://github.com/pytest-dev/pytest/issues/4181

Change-Id: Iad3b6845e94753c55771419ccd1f99852bc89159

6 years agoVersion 1.0.2 placeholder
Mike Bayer [Wed, 17 Oct 2018 14:54:31 +0000 (10:54 -0400)] 
Version 1.0.2 placeholder

6 years ago- 1.0.1 rel_1_0_1
Mike Bayer [Wed, 17 Oct 2018 14:51:08 +0000 (10:51 -0400)] 
- 1.0.1

6 years agoReplace union_update with update
Mike Bayer [Wed, 17 Oct 2018 14:14:22 +0000 (10:14 -0400)] 
Replace union_update with update

Fixed issue where removed method ``union_update()`` was used when a
customized :class:`.MigrationScript` instance included entries in the
``.imports`` data member, raising an AttributeError.

Change-Id: Ia141db106bc3d57238e2fa6a546041fd573c0ea4
Fixes: #512
6 years agoRevert "Replace set union_update() references with update()"
Mike Bayer [Wed, 17 Oct 2018 14:09:50 +0000 (10:09 -0400)] 
Revert "Replace set union_update() references with update()"

This reverts commit 7e3d032cc92af73988f02f281ab354de7fc8e3ab.   the
PR was not provided with a test case or bug report and this is actually
an uncovered code bug.  will re-submit with a proper bug report

6 years agoReplace set union_update() references with update()
Luis Calderon [Tue, 16 Oct 2018 13:38:54 +0000 (09:38 -0400)] 
Replace set union_update() references with update()

The autogenerate api references the `union_update()` method of sets which was removed in Python 2.4. The previous method is actually an alias for the `update()` method.

This PR replaces the api reference with the correct one for Python 2.7

Change-Id: Ida8d44bfd2efc9d3c6879ca8237d6b39e2b76987
Pull-request: https://github.com/zzzeek/alembic/pull/46

6 years agoMerge branch 'fix-setuptools-docs-link' of https://bitbucket.org/cdunklau/alembic
Mike Bayer [Tue, 25 Sep 2018 15:43:09 +0000 (11:43 -0400)] 
Merge branch 'fix-setuptools-docs-link' of https://bitbucket.org/cdunklau/alembic

Change-Id: I81e69d0dde1c17d97fd7e4e025d9442188d4e3be

6 years agoFix dead Setuptools doc link
Colin Dunklau [Sat, 22 Sep 2018 11:05:12 +0000 (13:05 +0200)] 
Fix dead Setuptools doc link

6 years agoDon't format output twice in writer
Mike Waites [Fri, 31 Aug 2018 19:42:27 +0000 (19:42 +0000)] 
Don't format output twice in writer

Fixed an issue where revision descriptions were essentially
being formatted twice. Any revision description that contained
characters like %, writing output to stdout will fail because
the call to config.print_stdout attempted to format any
additional args passed to the function.
This fix now only applies string formatting if any args are provided
along with the output text.

Fixes: #497
Change-Id: I64b2f00e8f67b95652bd7cbbe8510f8c5f645af1
Pull-request: https://github.com/zzzeek/alembic/pull/45

6 years agoRun batch tests per backend
Mike Bayer [Fri, 31 Aug 2018 20:24:16 +0000 (16:24 -0400)] 
Run batch tests per backend

Seeing a new unexpected success in limited scope for mysql,
correlating with addition of mariadb 10.3 to CI.  This test
should be producing db-specific successes/failures to track
it more easily

Change-Id: Ieacc640768caf98323c5652cb53189da2c43f553

7 years agoFix documentation for compare_against_backend SQLAlchemy method
Mike Bayer [Wed, 1 Aug 2018 17:37:52 +0000 (13:37 -0400)] 
Fix documentation for compare_against_backend SQLAlchemy method

Change-Id: Ic25de4facdb5467075f0f8b7e028e3e7db67ab66
Fixes: #501
7 years agoVersion 1.0.1 placeholder
Mike Bayer [Fri, 13 Jul 2018 18:10:57 +0000 (14:10 -0400)] 
Version 1.0.1 placeholder

7 years ago- 1.0.0 rel_1_0_0
Mike Bayer [Fri, 13 Jul 2018 18:09:19 +0000 (14:09 -0400)] 
- 1.0.0

7 years ago- repair classifier
Mike Bayer [Fri, 13 Jul 2018 18:01:46 +0000 (14:01 -0400)] 
- repair classifier

Change-Id: I42db26db364c7a4146b184da14e258ac93afce32

7 years ago- 1.0.0
Mike Bayer [Fri, 13 Jul 2018 18:04:47 +0000 (14:04 -0400)] 
- 1.0.0

7 years ago- 1.0.0
Mike Bayer [Fri, 13 Jul 2018 17:48:09 +0000 (13:48 -0400)] 
- 1.0.0

7 years agoDrop support for all SQLAlchemy < 0.9
Mike Bayer [Fri, 13 Jul 2018 16:36:06 +0000 (12:36 -0400)] 
Drop support for all SQLAlchemy < 0.9

With the 1.0 release, Alembic's minimum SQLAlchemy support version
moves to 0.9.0, previously 0.7.9.

Change-Id: I299d8af11c5982c4a792da1fcb96e4b437af687d

7 years agoRemove column from primary key when dropping
Mike Bayer [Wed, 11 Jul 2018 18:05:02 +0000 (14:05 -0400)] 
Remove column from primary key when dropping

Fixed issue in batch where dropping a primary key column, then adding it
back under the same name but without the primary_key flag, would not remove
it from the existing PrimaryKeyConstraint.  If a new PrimaryKeyConstraint
is added, it is used as-is, as was the case before.

Change-Id: Id79c793fbde1a17393adeb75c2da39f191e676e6
Fixes: #502
7 years agoblock cx_Oracle 6.4
Mike Bayer [Thu, 5 Jul 2018 03:32:17 +0000 (23:32 -0400)] 
block cx_Oracle 6.4

Prevents https://github.com/oracle/python-cx_Oracle/issues/199

Change-Id: Ie964f4cf0d57b65f18761e5673f9ce67c948114a

7 years agoMerge "Drop Python 2.6 / 3.3 support"
mike bayer [Sat, 30 Jun 2018 01:09:04 +0000 (21:09 -0400)] 
Merge "Drop Python 2.6 / 3.3 support"

7 years ago- move to "stable", modernize a bit
Mike Bayer [Fri, 29 Jun 2018 22:03:17 +0000 (18:03 -0400)] 
- move to "stable", modernize a bit

Change-Id: Ia4c29125de1373cdd7a327ea1a960415828466ca

7 years agoDrop Python 2.6 / 3.3 support
Hugo [Sat, 9 Jun 2018 14:41:43 +0000 (17:41 +0300)] 
Drop Python 2.6 / 3.3 support

For Alembic 1.0, Python 2.6 / 3.3 support is being dropped, allowing a
fixed setup.py to be built as well as universal wheels.  Pull request
courtesy Hugo.

Change-Id: Iff9018ea6c5a65b3560f7ca72e0ef233c822ec27
Fixes: #491
7 years agoVersion 1.0.0 placeholder
Mike Bayer [Fri, 29 Jun 2018 20:27:56 +0000 (16:27 -0400)] 
Version 1.0.0 placeholder

7 years ago- 0.9.10 rel_0_9_10
Mike Bayer [Fri, 29 Jun 2018 20:25:00 +0000 (16:25 -0400)] 
- 0.9.10

7 years agoMerge "Render autogenerate=True if present"
mike bayer [Fri, 29 Jun 2018 20:12:51 +0000 (16:12 -0400)] 
Merge "Render autogenerate=True if present"

7 years agoRender autogenerate=True if present
elad [Fri, 29 Jun 2018 15:13:43 +0000 (11:13 -0400)] 
Render autogenerate=True if present

Fixed issue where "autoincrement=True" would not render for a column that
specified it, since as of SQLAlchemy 1.1 this is no longer the default
value for "autoincrement".  Note the behavior only takes effect against the
SQLAlchemy 1.1.0 and higher; for pre-1.1 SQLAlchemy, "autoincrement=True"
does not render as was the case before. Pull request courtesy  Elad Almos.

Change-Id: Ia043c60b4bb6f0520056a08c8d5e2f0c838ddff7
Pull-request: https://bitbucket.org/zzzeek/alembic/pull-requests/80

7 years agoMake call to declarative_base clear in example.
Jack Grahl [Fri, 29 Jun 2018 15:21:00 +0000 (15:21 +0000)] 
Make call to declarative_base clear in example.

Having this function call in the example code makes it 100% clear that Base has to be initialized with the metadata object, and how to do this.

7 years agoMerge "Add py37, sqla1.2 tags, drop py33 testing"
mike bayer [Tue, 19 Jun 2018 23:43:41 +0000 (19:43 -0400)] 
Merge "Add py37, sqla1.2 tags, drop py33 testing"

7 years agoAdd py37, sqla1.2 tags, drop py33 testing
Mike Bayer [Tue, 19 Jun 2018 19:43:50 +0000 (15:43 -0400)] 
Add py37, sqla1.2 tags, drop py33 testing

Change-Id: I791bf86fb11d1f570eb01c135ec28e02e624721a

7 years agoUse external impl for type rendering
Mike Bayer [Fri, 18 May 2018 14:23:22 +0000 (10:23 -0400)] 
Use external impl for type rendering

The render_type() method of DefaultImpl was hardcoded to
only work for SQLAlchemy types.  Most of the work here involves
adding a proof of concept suite illustrating an external dialect
fully rendering types and nested types with imports.

Change-Id: Ia1bf7bad85efdc6083388e724601d5501f5e2454
Fixes: #494
7 years agoImplement native boolean check constraint flag in test suite
Mike Bayer [Fri, 18 May 2018 15:11:49 +0000 (11:11 -0400)] 
Implement native boolean check constraint flag in test suite

This is based on
https://github.com/zzzeek/sqlalchemy/commit/d2bacad469c0b07cc707b563e37e835abcf96eb8
which adds further specificity to SQL Server's boolean behaviors,
the test suite here expects a CHECK constraint to be rendered.

Change-Id: I2cce018135f292c7eeddcdbc724668ee9d9c9c48

7 years agoUse repr for drop_constraint schema
Denis Kataev [Wed, 11 Apr 2018 14:27:34 +0000 (10:27 -0400)] 
Use repr for drop_constraint schema

The "op.drop_constraint()" directive will now render using ``repr()`` for
the schema name, in the same way that "schema" renders for all the other op
directives.  Pull request courtesy Denis Kataev.

Change-Id: Ifbcabcfd87fc631ec12a488478851e7841275678
Pull-request: https://github.com/zzzeek/alembic/pull/44

7 years agoAdd recipe for generating Python code for existing tables
Mike Bayer [Wed, 28 Mar 2018 23:12:41 +0000 (19:12 -0400)] 
Add recipe for generating Python code for existing tables

Change-Id: Ia54f1a383d3b9ee32963f33276025bf8ae11d003

7 years agoVersion 0.9.10 placeholder
Mike Bayer [Thu, 22 Mar 2018 14:43:22 +0000 (10:43 -0400)] 
Version 0.9.10 placeholder

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