]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/log
thirdparty/sqlalchemy/alembic.git
5 years agoFix typo 593/head
Ashwin Ramaswami [Tue, 20 Aug 2019 16:19:02 +0000 (09:19 -0700)] 
Fix typo

6 years agoUse new create_mock_engine
Mike Bayer [Fri, 2 Aug 2019 18:04:58 +0000 (14:04 -0400)] 
Use new create_mock_engine

strategy="mock" is deprecated in 1.4

Change-Id: Ie96b7575c6ef9ca9e22874fb1bf1c19518bde3da

6 years agoUse SQLAlchemy's testing framework fully
Mike Bayer [Sun, 21 Jul 2019 18:12:12 +0000 (14:12 -0400)] 
Use SQLAlchemy's testing framework fully

w/ 1.1 as the minimum version we should be able
to remove the majority of the testing suite code

Change-Id: I04c4ab45e2ce47f20613d6111895c6230b946f76

6 years agoMerge "Bump to Alembic 1.1, bump requirements"
mike bayer [Sun, 21 Jul 2019 18:55:21 +0000 (18:55 +0000)] 
Merge "Bump to Alembic 1.1, bump requirements"

6 years agoBump to Alembic 1.1, bump requirements
Mike Bayer [Sun, 21 Jul 2019 16:56:20 +0000 (12:56 -0400)] 
Bump to Alembic 1.1, bump requirements

Alembic 1.1 bumps the minimum version of SQLAlchemy to 1.1.   As was the
case before, Python requirements remain at Python 2.7, or in the 3.x series
Python 3.4.

Change-Id: I68074fb4b59c96c4a596396a69aa143c65d048b5

6 years ago- Correct version info for dialect_opts feature
Mike Bayer [Sun, 21 Jul 2019 16:57:29 +0000 (12:57 -0400)] 
- Correct version info for dialect_opts feature

Change-Id: Ifb6c9ff84f6268994a0ecb628b85630d5181c32d

6 years agoAdd dialect_options to environment; set paramstyle=named for offline
Mike Bayer [Sat, 20 Jul 2019 16:54:37 +0000 (12:54 -0400)] 
Add dialect_options to environment; set paramstyle=named for offline

Fixed bug where the double-percent logic applied to some dialects such as
psycopg2 would be rendered in ``--sql`` mode, by allowing dialect options
to be passed through to the dialect used to generate SQL and then providing
``paramstyle="named"`` so that percent signs need not be doubled.   For
users having this issue, existing env.py scripts need to add
``dialect_opts={"paramstyle": "named"}`` to their offline
context.configure().  See the ``alembic/templates/generic/env.py`` template
for an example.

Change-Id: Ia6a495704b029eaff43fb3b6df602ca667002b7a
Fixes: #562
6 years agoAllow init into existing but empty directory
Aviskar KC [Thu, 4 Jul 2019 18:31:03 +0000 (14:31 -0400)] 
Allow init into existing but empty directory

The "alembic init" command will now proceed if the target directory exists
as long as it's still empty.  Previously, it would not proceed if the
directory existed. The new behavior is modeled from what git does, to
accommodate for container or other deployments where an Alembic target
directory may need to be already mounted instead of being created with
alembic init.  Pull request courtesy Aviskar KC.

Fixes: #571
Closes: #574
Pull-request: https://github.com/sqlalchemy/alembic/pull/574
Pull-request-sha: ab7b8f342a89c752460d171cd50d1f958c7d59c9

Change-Id: I6b0cff9a7e940d9d878aa339891bda33744a2a4c

6 years agoFix imp warning
Mike Bayer [Thu, 18 Jul 2019 15:59:59 +0000 (11:59 -0400)] 
Fix imp warning

Fixed use of the deprecated "imp" module, which is used to detect  pep3147
availability as well as to locate .pyc files, which started  emitting
deprecation warnings during the test suite.   The warnings were not being
emitted earlier during the test suite, the change is possibly due to
changes in py.test itself but this is not clear. The check for pep3147 is
set to True for any Python version 3.5 or greater now and importlib is used
when available.  Note that some dependencies such as distutils may still be
emitting this warning. Tests are adjusted to accommodate for dependencies
that emit the warning as well.

Pin pycodestyle - PyCQA/pydocstyle#375

Change-Id: Id7795d581f3ac2172960d31e33ee46b95117e5c4

6 years agoAdd cookbook recipe for non-ascii migration files under python 2
Mike Bayer [Wed, 3 Jul 2019 17:38:48 +0000 (13:38 -0400)] 
Add cookbook recipe for non-ascii migration files under python 2

Unicode-related directives can be added to ``script.py.mako``
and as this issue has never been reported for many years as well
as that Python 2 is deprecated, resolve this as a cookbook recipe
that illustrates where unicode related directives and conversions
need to occur under Python 2.

Change-Id: Ib8b5446c0ef26db8a99f2ca26da000e9134102e9
Fixes: #584
6 years agoDocument compare_type limitations
Mike Bayer [Wed, 3 Jul 2019 14:14:53 +0000 (10:14 -0400)] 
Document compare_type limitations

Change-Id: Ie02575598d052533c85b4c680c29605cb8560521
References: #583

6 years agoReplaceableObject: change `self.view` to `self.target`
William Weiskopf [Fri, 28 Jun 2019 16:47:53 +0000 (12:47 -0400)] 
ReplaceableObject: change `self.view` to `self.target`

6 years agoVersion 1.0.12 placeholder
Mike Bayer [Tue, 25 Jun 2019 21:39:41 +0000 (17:39 -0400)] 
Version 1.0.12 placeholder

6 years ago- 1.0.11 rel_1_0_11
Mike Bayer [Tue, 25 Jun 2019 21:36:29 +0000 (17:36 -0400)] 
- 1.0.11

6 years agoMerge "Ensure SQLite default expressions are parenthesized"
mike bayer [Tue, 25 Jun 2019 21:35:03 +0000 (21:35 +0000)] 
Merge "Ensure SQLite default expressions are parenthesized"

6 years agoEnsure SQLite default expressions are parenthesized
Mike Bayer [Tue, 25 Jun 2019 15:40:56 +0000 (11:40 -0400)] 
Ensure SQLite default expressions are parenthesized

- SQLite server default reflection will ensure parenthesis are surrounding a
column default expression that is detected as being a non-constant
expression, such as a ``datetime()`` default, to accommodate for the
requirement that SQL expressions have to be parenthesized when being sent
as DDL.  Parenthesis are not added to constant expressions to allow for
maximum cross-compatibility with other dialects and existing test suites
(such as Alembic's), which necessarily entails scanning the expression to
eliminate for constant numeric and string values. The logic is added to the
two "reflection->DDL round trip" paths which are currently autogenerate and
batch migration.  Within autogenerate, the logic is on the rendering side,
whereas in batch the logic is installed as a column reflection hook.

- Improved SQLite server default comparison to accommodate for a ``text()``
construct that added parenthesis directly vs. a construct that relied
upon the SQLAlchemy SQLite dialect to render the parenthesis, as well
as improved support for various forms of constant expressions such as
values that are quoted vs. non-quoted.

- Fixed bug where the "literal_binds" flag was not being set when
autogenerate would create a server default value, meaning server default
comparisons would fail for functions that contained literal values.

Fixes: #579
Change-Id: I78b87573b8ecd15cb4ced08f054902f574e3956c

6 years agofix "sqlalchemy" typo
Mike Bayer [Tue, 25 Jun 2019 19:33:41 +0000 (15:33 -0400)] 
fix "sqlalchemy" typo

Change-Id: I0c98747dfebabb2a9593a270ab599bd7575e90fd

6 years agoReport warnings from caller's file/line number, not utils.py
Ash Berlin-Taylor [Fri, 21 Jun 2019 12:53:11 +0000 (08:53 -0400)] 
Report warnings from caller's file/line number, not utils.py

Warnings emitted by Alembic now include a default stack level of 2, and in
some cases it's set to 3, in order to help warnings indicate more closely
where they are originating from.  Pull request courtesy Ash Berlin-Taylor.

Closes: #578
Pull-request: https://github.com/sqlalchemy/alembic/pull/578
Pull-request-sha: 49d2922dc61bfc6da42a5f45b53f04032970daeb

Change-Id: I31e19cacd63a4a7ff0557d9e7f52d348f63744d6

6 years agoAdd "usecase" changelog tag
Mike Bayer [Mon, 3 Jun 2019 16:52:12 +0000 (12:52 -0400)] 
Add "usecase" changelog tag

"usecase" indicates the library now supports something a user
was trying to do.  It's not quite a "feature" since it's something
that seems like it should have worked, it's not a "bug" because
no mistake was made, it's just something that wasn't considered before.
The advantage of "usecase" is that it inherently suggests a different
style of prioritization vs. something that is preventing the library
from working as designed.

This change also adds docs/build/conf.py under the pep8 formatting
test coverage, and additionally moves release / release_date to
be present within; the release scripts will be altered to include
this.

Change-Id: Iea071a320e7a3672b35a41b13d5a74c0da5f9074

6 years agoUse vendored getargspec()
Mike Bayer [Wed, 29 May 2019 21:32:57 +0000 (17:32 -0400)] 
Use vendored getargspec()

Replaced the Python compatbility routines for ``getargspec()`` with a fully
vendored version based on ``getfullargspec()`` from Python 3.3.
Originally, Python was emitting deprecation warnings for this function in
Python 3.8 alphas.  While this change was reverted, it was observed that
Python 3 implementations for ``getfullargspec()`` are an order of magnitude
slower as of the 3.4 series where it was rewritten against ``Signature``.
While Python plans to improve upon this situation, SQLAlchemy projects for
now are using a simple replacement to avoid any future issues.

Change-Id: If5f3e2f6cc0df8d89e6c3035e024df3319964bf9
Fixes: #563
6 years agoFix rst flake8 issues that have come online w/ latest update
Mike Bayer [Wed, 29 May 2019 22:49:38 +0000 (18:49 -0400)] 
Fix rst flake8 issues that have come online w/ latest update
of flake8-rst-docstrings

Change-Id: I19288e69128648045d826045343fa5c1c8426ec2

6 years ago- update LICENSE to exact MIT text
Mike Bayer [Tue, 28 May 2019 16:44:28 +0000 (12:44 -0400)] 
- update LICENSE to exact MIT text

Change-Id: Ie49666cb11eb00a40d805f4f80a3d83490b70964

6 years ago- add OSI classifier for license
Mike Bayer [Tue, 28 May 2019 13:46:05 +0000 (09:46 -0400)] 
- add OSI classifier for license

Change-Id: I6c224a8b4061a02cb31d07161bb67632a6b3d1e3

6 years agoAdd issue tracker metadata
Mike Bayer [Mon, 27 May 2019 23:03:55 +0000 (19:03 -0400)] 
Add issue tracker metadata

Change-Id: I850c35cef1b4baed7b30510429d1785d0bf5673a

6 years ago- add sqla 1.3 part 2
Mike Bayer [Thu, 23 May 2019 22:50:26 +0000 (18:50 -0400)] 
- add sqla 1.3 part 2

Change-Id: Id970fe3b2fc64459737e5d0a77fdd8304cc6a7ae

6 years ago- add sqla 1.3
Mike Bayer [Thu, 23 May 2019 20:55:48 +0000 (16:55 -0400)] 
- add sqla 1.3

Change-Id: Id568effcce6a1706f37787baa8afcfadf221abc7

6 years agoUse CHANGE COLUMN for MySQL / MariaDB DateTime server default change
Mike Bayer [Mon, 20 May 2019 17:29:55 +0000 (13:29 -0400)] 
Use CHANGE COLUMN for MySQL / MariaDB DateTime server default change

Fixed issue where MySQL databases need to use CHANGE COLUMN when altering a
server default of CURRENT_TIMESTAMP, NOW() and probably other functions
that are only usable with DATETIME/TIMESTAMP columns.  While MariaDB
supports both CHANGE and ALTER COLUMN in this case, MySQL databases only
support CHANGE.  So the new logic is that if the server default change is
against a DateTime-oriented column, the CHANGE format is used
unconditionally, as in the vast majority of cases the server default is to
be CURRENT_TIMESTAMP which may also be potentially bundled with an "ON
UPDATE CURRENT_TIMESTAMP" directive, which SQLAlchemy does not currently
support as a distinct field.

Change-Id: I67cf75c2fba640e737f5ffd79a8ad5636b9eeccc
Fixes: #564
6 years agoCreate alter column backend test fixture
Mike Bayer [Sun, 19 May 2019 22:33:39 +0000 (18:33 -0400)] 
Create alter column backend test fixture

For more expedient confirmation of op functionality,
start building generalized backend fixtures for ops.

Add basic round trip tests for alter column, obviously
disabled on SQLite.   Ensure this passes for the full
span of MySQL, Oracle, SQL Server on CI (PG is fine).
Next we can begin adding tests for all the MySQL issues
that are coming up such as #564, where regular ALTER COLUMN
is not consistently implemented based on datatypes etc.

Change-Id: I00ef174aa791ce7baeb764c5915591cd095deae0

6 years agoAdd .pre-commit-config.yaml
Mike Bayer [Sat, 18 May 2019 14:50:40 +0000 (10:50 -0400)] 
Add .pre-commit-config.yaml

See https://pre-commit.com/ for documentation on how to use
this file.

SQLAlchemy and related projects make use of Black and zimports
for code formatting, this hook allows for automated pre-commit
runs.

Change-Id: I4bbb49747e9f7fb52251dc61ecda98361cd036fd

6 years agoAdd database freshness check cookbook recipe
m-aciek [Mon, 13 May 2019 21:12:10 +0000 (23:12 +0200)] 
Add database freshness check cookbook recipe

Change-Id: Iefeaadefafa286dbdb50d3034549284ee31f6623
Fixes: #559
Closes: #560
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
(cherry picked from commit 81a595598f352b4f93cdf849df7d96ab3b1fc8af)

6 years agoUpdate to latest README.unittests.rst
Mike Bayer [Mon, 6 May 2019 14:11:04 +0000 (10:11 -0400)] 
Update to latest README.unittests.rst

Also note run_tests.py is deprecated.

Change-Id: Ie82dd3133b487f61b32e005d6f2b8941cddfcce3
Fixes: #557
6 years agoMerge "Further updates to CHECK logic"
mike bayer [Mon, 6 May 2019 02:40:14 +0000 (02:40 +0000)] 
Merge "Further updates to CHECK logic"

6 years agoFurther updates to CHECK logic
Mike Bayer [Sat, 4 May 2019 17:25:25 +0000 (13:25 -0400)] 
Further updates to CHECK logic

Change-Id: I5b0905df8d438eaa2a9665203f3d98a0db9c31f4

6 years agoEmit DROP CHECK for MySQL, DROP CONSTRAINT for MariaDB
Mike Bayer [Tue, 30 Apr 2019 14:23:20 +0000 (10:23 -0400)] 
Emit DROP CHECK for MySQL, DROP CONSTRAINT for MariaDB

Added support for MySQL "DROP CHECK", which is added as of MySQL 8.0.16,
separate from MariaDB's "DROP CONSTRAINT" for CHECK constraints.  The MySQL
Alembic implementation now checks for "MariaDB" in server_version_info to
decide which one to use.

Change-Id: I22d1eb084570769ec11b654bc01af3a0938d9a7c
Fixes: #554
6 years agoTune "rename boolean column w CHECK constraint" test for MySQL 8, mariadb10.2
Mike Bayer [Thu, 2 May 2019 15:41:48 +0000 (09:41 -0600)] 
Tune "rename boolean column w CHECK constraint" test for MySQL 8, mariadb10.2

Change-Id: Idb5292f3976b9632069145ff0a7df948a945d7d8
Fixes: #556
6 years agoVersion 1.0.11 placeholder
Mike Bayer [Sun, 28 Apr 2019 19:00:36 +0000 (15:00 -0400)] 
Version 1.0.11 placeholder

6 years ago- 1.0.10 rel_1_0_10
Mike Bayer [Sun, 28 Apr 2019 18:55:16 +0000 (14:55 -0400)] 
- 1.0.10

6 years ago-fix typo
Mike Bayer [Sun, 28 Apr 2019 18:51:34 +0000 (14:51 -0400)] 
-fix typo

Change-Id: I31641577b8324a7ed713356a6ae597d19e1c61e4

6 years agoMerge "Check for rendered integer default is None on MySQL"
mike bayer [Sun, 28 Apr 2019 03:14:02 +0000 (03:14 +0000)] 
Merge "Check for rendered integer default is None on MySQL"

6 years agoCheck for rendered integer default is None on MySQL
Mike Bayer [Sat, 27 Apr 2019 00:22:21 +0000 (20:22 -0400)] 
Check for rendered integer default is None on MySQL

Fixed bug when using the
:paramref:`.EnvironmentContext.configure.compare_server_default` flag set
to ``True``where a server default that is introduced in the table metadata
on an ``Integer`` column, where there is no existing server default in the
database, would raise a ``TypeError``.

Change-Id: Ia2954cc113b47687d1cbf8244c77742326a50c86
Fixes: #553
6 years agoMerge "Raise for non-string revision identifier"
mike bayer [Sun, 28 Apr 2019 03:12:41 +0000 (03:12 +0000)] 
Merge "Raise for non-string revision identifier"

6 years agoRaise for non-string revision identifier
Mike Bayer [Wed, 24 Apr 2019 18:46:03 +0000 (13:46 -0500)] 
Raise for non-string revision identifier

Added an assertion in :meth:`.RevisionMap.get_revisions` and other methods
which ensures revision numbers are passed as strings or collections of
strings.   Driver issues particularly on MySQL may inadvertently be passing
bytes here which leads to failures later on.

Change-Id: Id80c958f0a082fed26cac2cf838cb7507b8d814c
Fixes: #551
6 years agoMerge "Use first line of command docstring for help text."
mike bayer [Tue, 23 Apr 2019 22:36:48 +0000 (22:36 +0000)] 
Merge "Use first line of command docstring for help text."

6 years agoUse first line of command docstring for help text.
Mike Bayer [Tue, 23 Apr 2019 17:21:09 +0000 (12:21 -0500)] 
Use first line of command docstring for help text.

Fixed bug introduced in release 1.0.9 where the helptext for commands
inadvertently got expanded to include function docstrings from the
command.py module.  The logic has been adjusted to only refer to the first
line of each docstring as was the original intent.

Change-Id: I88d7b31b6b54fd065511d969849aef3977eaf6a0
Fixes: #552
6 years agoVersion 1.0.10 placeholder
Mike Bayer [Mon, 15 Apr 2019 15:47:18 +0000 (11:47 -0400)] 
Version 1.0.10 placeholder

6 years ago- 1.0.9 rel_1_0_9
Mike Bayer [Mon, 15 Apr 2019 15:38:59 +0000 (11:38 -0400)] 
- 1.0.9

6 years agoMerge "Remove formatargspec work from create_method_proxy"
mike bayer [Sat, 30 Mar 2019 03:27:57 +0000 (03:27 +0000)] 
Merge "Remove formatargspec work from create_method_proxy"

6 years agoRemove formatargspec work from create_method_proxy
Mike Bayer [Fri, 29 Mar 2019 17:46:32 +0000 (13:46 -0400)] 
Remove formatargspec work from create_method_proxy

Simplified the internal scheme used to generate the ``alembic.op`` namespace
to no longer attempt to generate full method signatures (e.g. rather than
generic ``*args, **kw``) as this was not working in most cases anyway, while
in rare circumstances it would in fact sporadically have access to the real
argument names and then fail when generating the function due to missing
symbols in the argument signature.

Change-Id: I06e4ecf1ddcdb0799856ba7e39b17f28d19cc5d2
Fixes: #548
6 years agoAdd missing whitespace to configuration template and doc example.
Aru Sahni [Sat, 16 Mar 2019 21:31:19 +0000 (17:31 -0400)] 
Add missing whitespace to configuration template and doc example.

As a developer who uses whitespace-sensitive programming language, this made my eye twitch ðŸ˜„

Closes: #546
Pull-request: https://github.com/sqlalchemy/alembic/pull/546
Pull-request-sha: 5315a92ff2d88699ea0404c2ebb56fc3833452ed

Change-Id: I90c5561cb27cf78e34c64def24ea13808a860d2e

6 years agoremove unnecessary "from __future__ import with_statement" from env templates
Felix Schwarz [Wed, 13 Mar 2019 13:22:05 +0000 (09:22 -0400)] 
remove unnecessary "from __future__ import with_statement" from env templates

That future import is only required for Python 2.5. alembic 1.0 requires Python 2.7 at least so
we can drop this line.

Closes: #544
Pull-request: https://github.com/sqlalchemy/alembic/pull/544
Pull-request-sha: 3d68986c1409152f85ff6d444710249b825e36f3

Change-Id: I51579449b262e33917f4d97a6fb58fc9a02b694a

6 years agoVersion 1.0.9 placeholder
Mike Bayer [Mon, 4 Mar 2019 18:03:59 +0000 (13:03 -0500)] 
Version 1.0.9 placeholder

6 years ago- 1.0.8 rel_1_0_8
Mike Bayer [Mon, 4 Mar 2019 18:01:32 +0000 (13:01 -0500)] 
- 1.0.8

6 years agoMerge "Use basepython 3.7 for flake8 tests"
mike bayer [Mon, 4 Mar 2019 17:40:47 +0000 (17:40 +0000)] 
Merge "Use basepython 3.7 for flake8 tests"

6 years agoUse basepython 3.7 for flake8 tests
Mike Bayer [Mon, 4 Mar 2019 17:21:00 +0000 (12:21 -0500)] 
Use basepython 3.7 for flake8 tests

this to prevent flake8 from running with python 2 as we have
py3k-specific checks

Change-Id: I82404ea91ecdfc29c70dbc2773f481a3c844215c

6 years agoMerge "Clarify and correct PostgreSQL server default comparison for py37"
mike bayer [Mon, 4 Mar 2019 15:45:29 +0000 (15:45 +0000)] 
Merge "Clarify and correct PostgreSQL server default comparison for py37"

6 years agoClarify and correct PostgreSQL server default comparison for py37
Mike Bayer [Mon, 4 Mar 2019 14:37:08 +0000 (09:37 -0500)] 
Clarify and correct PostgreSQL server default comparison for py37

Fixed issue where server default comparison on the PostgreSQL dialect would
fail for a blank string on Python 3.7 only, due to a change in regular
expression behavior in Python 3.7.

Change-Id: Iac62ba77622d63ad0c2666cf20a4622f98cf14e6
Fixes: #541
6 years agoRemoved force parameter from base.py
Parth Shandilya [Mon, 4 Feb 2019 19:26:48 +0000 (14:26 -0500)] 
Removed force parameter from base.py

Removed use of deprecated ``force`` parameter for SQLAlchemy quoting
functions as this parameter will be removed in a future release.
Pull request courtesy Parth Shandilya(ParthS007).

Fixes: #528
Closes: #532
Pull-request: https://github.com/sqlalchemy/alembic/pull/532
Pull-request-sha: 61ce70217527ab67395fa90ebaf4631837b3fe5a

Change-Id: I93b2a0697366b9c0f95338e134d032aaf32c7130

6 years agoUpdate documentation for Config
Federico T [Fri, 15 Feb 2019 18:11:51 +0000 (15:11 -0300)] 
Update documentation for Config

Replace "url" with "sqlalchemy.url" in example use of Config object.

Change-Id: Ib1179885ea82322b9838d6889d937400c96e207e
Fixes: #536
6 years agotry removing !U for this test
Mike Bayer [Thu, 7 Feb 2019 16:05:17 +0000 (11:05 -0500)] 
try removing !U for this test

Change-Id: I6668feedc3067938ae1bc364f3d531564355bed8

6 years agoRepair tests for SQLAlchemy 1.3 safestring change
Mike Bayer [Thu, 7 Feb 2019 15:04:41 +0000 (10:04 -0500)] 
Repair tests for SQLAlchemy 1.3 safestring change

Latest 1.3 includes checks for valid SQL keywords and applies
column() to the element of ExcludeConstraint, adjust tests to
work for this as well as previous behavior.

Change-Id: I7ee571d04cd359dce5b170ed1178cb5637694a10

6 years agoVersion 1.0.8 placeholder
Mike Bayer [Sat, 26 Jan 2019 02:06:39 +0000 (21:06 -0500)] 
Version 1.0.8 placeholder

6 years ago- 1.0.7 rel_1_0_7
Mike Bayer [Sat, 26 Jan 2019 02:03:56 +0000 (21:03 -0500)] 
- 1.0.7

6 years agoRemove print statement
Mike Bayer [Thu, 24 Jan 2019 08:07:02 +0000 (03:07 -0500)] 
Remove print statement

Change-Id: I0c0d6701daa1c84b0905b5c4a8cab2383059389e
References: #529

6 years agoFix single quote escaping for the SQL comments
Damien Garaud [Wed, 23 Jan 2019 16:13:37 +0000 (11:13 -0500)] 
Fix single quote escaping for the SQL comments

Fixed issue in new comment support where autogenerated Python code
for comments wasn't using ``repr()`` thus causing issues with
quoting.  Pull request courtesy Damien Garaud.

Fixes: #529
Closes: #530
Pull-request: https://github.com/sqlalchemy/alembic/pull/530
Pull-request-sha: c85f2de986da6c1231a18732b097ff890e67977e

Change-Id: I7e55cc1968ba83765386c66bd1f1e69a593f133a

6 years agoVersion 1.0.7 placeholder
Mike Bayer [Sun, 13 Jan 2019 18:03:47 +0000 (13:03 -0500)] 
Version 1.0.7 placeholder

6 years ago- 1.0.6 rel_1_0_6
Mike Bayer [Sun, 13 Jan 2019 18:00:48 +0000 (13:00 -0500)] 
- 1.0.6

6 years agoinclude 1.2.16 for fixes SQLA issue 4436
Mike Bayer [Sun, 13 Jan 2019 17:59:48 +0000 (12:59 -0500)] 
include 1.2.16 for fixes SQLA issue 4436

Change-Id: I34e007618f846a51c2a58754131db9670b77f825

6 years ago- happy new year
Mike Bayer [Sun, 13 Jan 2019 17:44:52 +0000 (12:44 -0500)] 
- happy new year

Change-Id: I7ee1ea57bc4a753155983ced0559ca81797f7531

6 years agoUpdate comment documentation, make sure tests always run
Mike Bayer [Fri, 11 Jan 2019 20:40:10 +0000 (15:40 -0500)] 
Update comment documentation, make sure tests always run

Corrected the links and text in the changelog note as well as
ensured new comment-oriented methods and parameters include a
versionadded token.    Added a more specific check so that
any run of the tests will make sure SQLAlchemy issue 4436
is resolved as 1.2.16 resolves it but 1.3.0b1, which currently
comes out for "python setup.py test", does not.

Change-Id: Ibd94bf7940b279e85b0ec1ddceb309df0c18f0b1

6 years agoImplemented support for Table and Column Comments
Mike Waites [Fri, 31 Aug 2018 18:56:36 +0000 (19:56 +0100)] 
Implemented support for Table and Column Comments

Added Table and Column level comments for supported backends.
`create_table`, `add_column` and `alter_column` now optionally
take  `comment="X"` kwarg.  Support for autogenerate for Table
and Column objects has also been added

Fixes: #422
Change-Id: I1fd37bb7fe3d167baf7b1e7bf7ff5bfd48e7cf54

6 years agoFix package local object import
Mike Bayer [Mon, 7 Jan 2019 22:21:35 +0000 (17:21 -0500)] 
Fix package local object import

An import cycle created by importing an object from
__init__.py is resolved by importing from the local
module.

Change-Id: Idbd357dcfbb792cafe3c765f7bb8b1d19aa16971

6 years agozimports run
Mike Bayer [Sun, 6 Jan 2019 17:50:53 +0000 (12:50 -0500)] 
zimports run

after black is applied, rewrite imports and fix
remaining whitespace / identifier issues.

Change-Id: I49474c085b5f4a4b52e4cf90c9705d6a896d4003

6 years agopure black run + flake8
Mike Bayer [Sun, 6 Jan 2019 17:37:53 +0000 (12:37 -0500)] 
pure black run + flake8

run black -l 79 against source code, set up for
full flake8 testing.

Change-Id: I4108e1274d49894b9898ec5bd3a1147933a473d7

6 years agoFix expect_warnings_on function
Mike Bayer [Sun, 6 Jan 2019 18:06:56 +0000 (13:06 -0500)] 
Fix expect_warnings_on function

This function is not used in Alembic right now but it contained
undefined symbols, re-copy over from SQLAlchemy.

Change-Id: I3eb6eb76dc1d0d83606fa2a4af88300ee802d3bf

6 years agoCorrect postgresql provisioning
Mike Bayer [Sun, 6 Jan 2019 18:01:37 +0000 (13:01 -0500)] 
Correct postgresql provisioning

port of a fix from SQLAlchemy that corrects the
retry mechanism when creating databases

Change-Id: Id7ee757c065338ccfe3118203a139fc959ed40d8

6 years agoreword op.execute()
Mike Bayer [Fri, 28 Dec 2018 14:05:27 +0000 (09:05 -0500)] 
reword op.execute()

Apparently op.execute() makes use of _exec() which coerces strings
into text() constructs.  This is less than ideal, however for now
document the caveat that colons need to be escaped.

Change-Id: I17e0ff6a46e6f5be93e692a67ddd8e7b523d9508
Fixes: #522
6 years agoAll sphinx dependencies move under the github sqlalchemy organization
Mike Bayer [Mon, 3 Dec 2018 22:04:34 +0000 (17:04 -0500)] 
All sphinx dependencies move under the github sqlalchemy organization

Change-Id: I9e268697b11e91c76535f85db3b2883c0d6fb0f2

6 years agoChange reference to dogpile.cache to Alembic 520/head
rrueth [Thu, 29 Nov 2018 18:47:27 +0000 (10:47 -0800)] 
Change reference to dogpile.cache to Alembic

6 years agoVersion 1.0.6 placeholder
Mike Bayer [Wed, 28 Nov 2018 04:31:31 +0000 (23:31 -0500)] 
Version 1.0.6 placeholder

6 years ago- 1.0.5 rel_1_0_5
Mike Bayer [Wed, 28 Nov 2018 04:28:54 +0000 (23:28 -0500)] 
- 1.0.5

6 years agoMerge "Vendor python3 formatargspec, import from collections.abc"
mike bayer [Wed, 28 Nov 2018 04:11:54 +0000 (04:11 +0000)] 
Merge "Vendor python3 formatargspec, import from collections.abc"

6 years agoVendor python3 formatargspec, import from collections.abc
Stefan Tjarks [Thu, 22 Nov 2018 03:08:56 +0000 (22:08 -0500)] 
Vendor python3 formatargspec, import from collections.abc

Resolved remaining Python 3 deprecation warnings, covering
the use of inspect.formatargspec() with a vendored version
copied from the Python standard library, importing
collections.abc above Python 3.3 when testing against abstract
base classes, fixed one occurrence of log.warn(), as well as a few
invalid escape sequences.

Add DeprecationWarning to the test suite as an error raise
as has been the case within SQLAlchemy for some time now.

Fixes: #507
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I121121b3d2dd90e6f3c9b16dec2fc80b9699c400
Pull-request: https://bitbucket.org/zzzeek/alembic/pull-requests/85

6 years agoVersion 1.0.5 placeholder
Mike Bayer [Wed, 28 Nov 2018 01:05:25 +0000 (20:05 -0500)] 
Version 1.0.5 placeholder

6 years ago- 1.0.4 rel_1_0_4
Mike Bayer [Wed, 28 Nov 2018 01:01:50 +0000 (20:01 -0500)] 
- 1.0.4

6 years agodoc build has a dependency on Mako
Mike Bayer [Wed, 28 Nov 2018 01:00:20 +0000 (20:00 -0500)] 
doc build has a dependency on Mako

This probably has never shown up because we typically
have Mako installed where we are building sphinx docs

Change-Id: I065c28677ead3bcef75ac6e949ac90c4a19ed1dc

6 years agoMove to github, new domain, sqlalchemy links
Mike Bayer [Tue, 27 Nov 2018 03:42:28 +0000 (22:42 -0500)] 
Move to github, new domain, sqlalchemy links

Alembic is now under the sqlalchemy.org domain
for the website and all repos are moving under github.com/sqlalchemy.

Change-Id: Id9ce08b61ed0ccdf50396f911838b21112e61652

6 years agoremove @HEAD indicator from docs requirements gh/master
Mike Bayer [Mon, 26 Nov 2018 05:19:55 +0000 (00:19 -0500)] 
remove @HEAD indicator from docs requirements

this is failing with more recent git/pip combinations.

Change-Id: Ib35e8e80d9d116c00ab1eadba4bca3f0d52f4f77

6 years ago- move homepage
Mike Bayer [Sun, 25 Nov 2018 05:37:05 +0000 (00:37 -0500)] 
- move homepage

Change-Id: Ic08fafa09be72e67f4db641ea157fb841cae9ca0

6 years agoTweak desc for --sql to ref offline mode
Sam Park [Wed, 21 Nov 2018 04:26:05 +0000 (20:26 -0800)] 
Tweak desc for --sql to ref offline mode

For the longest time I thought `upgrade --sql head` just outputs the raw SQL for the
upgrade (as opposed to dumping the entire history in SQL).

Maybe this will help the naive like me?

6 years agoVersion 1.0.4 placeholder
Mike Bayer [Wed, 14 Nov 2018 20:37:40 +0000 (15:37 -0500)] 
Version 1.0.4 placeholder

6 years ago- 1.0.3 rel_1_0_3
Mike Bayer [Wed, 14 Nov 2018 20:29:38 +0000 (15:29 -0500)] 
- 1.0.3

6 years agoCheck for mssql_include is None
Mike Bayer [Wed, 14 Nov 2018 18:53:57 +0000 (13:53 -0500)] 
Check for mssql_include is None

Fixed regression caused by :ticket:`513`, where the logic to consume
``mssql_include`` was not correctly interpreting the case where the flag
was not present, breaking the ``op.create_index`` directive for SQL Server
as a whole.

Change-Id: I4c3a9d1f12017b62a7affa3863bba6e2bead67cf
Fixes: #516
6 years agounblock for py.test as of 3.9.3
Mike Bayer [Fri, 2 Nov 2018 20:22:20 +0000 (16:22 -0400)] 
unblock for py.test as of 3.9.3

Change-Id: Ib00d07058997e97a992084bd949ebb6ed2bcb2e2
References: I867e2b36122f578e69f2444ef9712cd73995cce3

6 years agoVersion 1.0.3 placeholder
Mike Bayer [Wed, 31 Oct 2018 20:34:47 +0000 (16:34 -0400)] 
Version 1.0.3 placeholder

6 years ago- 1.0.2 rel_1_0_2
Mike Bayer [Wed, 31 Oct 2018 20:32:36 +0000 (16:32 -0400)] 
- 1.0.2

6 years agoDont autogenerate "system=True", render flag correctly
Mike Bayer [Wed, 24 Oct 2018 17:44:09 +0000 (13:44 -0400)] 
Dont autogenerate "system=True", render flag correctly

The ``system=True`` flag on :class:`.Column`, used primarily in conjunction
with the Postgresql "xmin" column, now renders within the autogenerate
render process, allowing the column to be excluded from DDL.  Additionally,
adding a system=True column to a model will produce no autogenerate diff as
this column is implicitly present in the database.

Change-Id: Ie3aab9d489ebb9aecccbdf9d5b3ce8ccc42554bf
Fixes: #515
6 years agoblock all py.test 3.9.1 or greater until
Mike Bayer [Wed, 24 Oct 2018 17:44:09 +0000 (13:44 -0400)] 
block all py.test 3.9.1 or greater until
https://github.com/pytest-dev/pytest/issues/4181 is fixed

Change-Id: I867e2b36122f578e69f2444ef9712cd73995cce3

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