]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/log
thirdparty/sqlalchemy/alembic.git
5 years agoMemoize elements in rewriter; use correct iteration
Mike Bayer [Thu, 19 Sep 2019 01:47:27 +0000 (21:47 -0400)] 
Memoize elements in rewriter; use correct iteration

Modified the logic of the :class:`.Rewriter` object such that it keeps a
memoization of which directives it has processed, so that it can ensure it
processes a particular directive only once, and additionally fixed
:class:`.Rewriter` so that it functions correctly for multiple-pass
autogenerate schemes, such as the one illustrated in the "multidb"
template.  By tracking which directives have been processed, a
multiple-pass scheme which calls upon the :class:`.Rewriter` multiple times
for the same structure as elements are added can work without running
duplicate operations on the same elements more than once.

Change-Id: I2cef13d51912f9d86ddd99b60e4d5b96dbf680ff
Fixes: #505
5 years ago- call the next release 1.2.0
Mike Bayer [Thu, 19 Sep 2019 00:15:52 +0000 (20:15 -0400)] 
- call the next release 1.2.0

Change-Id: I7d0b145afeaff8dfbdbe05d98486bdef3c0b46c2

5 years agoMerge "Support autogenerate for add_column kwargs"
mike bayer [Thu, 19 Sep 2019 00:13:42 +0000 (00:13 +0000)] 
Merge "Support autogenerate for add_column kwargs"

5 years agoMerge "Only allow partial revision match for > 3 characters"
mike bayer [Wed, 18 Sep 2019 01:01:03 +0000 (01:01 +0000)] 
Merge "Only allow partial revision match for > 3 characters"

5 years agoSupport autogenerate for add_column kwargs
Mike Bayer [Tue, 17 Sep 2019 23:00:50 +0000 (19:00 -0400)] 
Support autogenerate for add_column kwargs

Added autogenerate support for :class:`.Column` objects that have
dialect-specific ``**kwargs``, support first added in SQLAlchemy 1.3.
This includes SQLite "on conflict" as well as options used by some
third party dialects.

Change-Id: Iede4ee74e74181f2f2357c6a69c6f3fa0c985392
Fixes: #518
5 years agoMerge "Render a single "pass" only for UpgradeOps, DowngradeOps"
mike bayer [Tue, 17 Sep 2019 23:08:53 +0000 (23:08 +0000)] 
Merge "Render a single "pass" only for UpgradeOps, DowngradeOps"

5 years agoMerge "Use repr for table comment in create_table_comment / drop_table_comment"
mike bayer [Tue, 17 Sep 2019 23:04:20 +0000 (23:04 +0000)] 
Merge "Use repr for table comment in create_table_comment / drop_table_comment"

5 years agoOnly allow partial revision match for > 3 characters
Mike Bayer [Tue, 17 Sep 2019 22:25:41 +0000 (18:25 -0400)] 
Only allow partial revision match for > 3 characters

Made the command interface revision lookup behavior more strict in that an
Alembic revision number is only resolved based on a partial match rules if
it has at least four characters, to prevent simple typographical issues
from inadvertently  running migrations.

Change-Id: I9c4c87bb3fdb78d2dd264f37c99422df309c4e5c
Fixes: #534
5 years agoRender a single "pass" only for UpgradeOps, DowngradeOps
Mike Bayer [Tue, 17 Sep 2019 21:55:44 +0000 (17:55 -0400)] 
Render a single "pass" only for UpgradeOps, DowngradeOps

Improved the Python rendering of a series of migration operations such that
a single "pass" is rendered for a :class:`.UpgradeOps` or
:class:`.DowngradeOps` based on if no lines of Python code actually
rendered under the operation, rather than whether or not sub-directives
exist. Removed extra "pass" lines that would generate from the
:class:`.ModifyTableOps` directive so that these aren't duplicated under
operation rewriting scenarios.

Change-Id: Ia2547811565ac24ee0f56ce470f96ec567912de3
Fixes: #550
5 years agoTest PG autocommit only on postgresql
Mike Bayer [Tue, 17 Sep 2019 21:56:57 +0000 (17:56 -0400)] 
Test PG autocommit only on postgresql

Change-Id: Idee4a70b03a6c3939e77573b14658a67a07e6cea
Fixes: #123
5 years agoUse repr for table comment in create_table_comment / drop_table_comment
Mike Bayer [Tue, 17 Sep 2019 21:43:47 +0000 (17:43 -0400)] 
Use repr for table comment in create_table_comment / drop_table_comment

Fixed bug where rendering of comment text for table-level comments  within
:meth:`.Operations.create_table_comment` and
:meth:`.Operations.drop_table_comment` was not properly quote-escaped
within rendered Python code for autogenerate.

Fixes: #549
Change-Id: I0356cf0eb7c6c6dd3f765bd3ed6e81bccf62468c

5 years agoAdd autocommit_block
Mike Bayer [Tue, 17 Sep 2019 19:26:32 +0000 (15:26 -0400)] 
Add autocommit_block

Added new feature :meth:`.MigrationContext.autocommit_block`, a special
directive which will provide for a non-transactional block inside of a
migration script. The feature requres that: the database driver
(e.g. DBAPI) supports the AUTOCOMMIT isolation mode.  The directive
also necessarily needs to COMMIT the existing transaction in progress
in order to enter autocommit mode.

Change-Id: I107fe9772595db189b6ebeba6535ac8f275b3fe5
Fixes: #123
5 years agoMerge "fix CAST assertions for SQLA 1.4"
mike bayer [Fri, 30 Aug 2019 22:24:09 +0000 (22:24 +0000)] 
Merge "fix CAST assertions for SQLA 1.4"

5 years agofix CAST assertions for SQLA 1.4
Mike Bayer [Fri, 30 Aug 2019 21:21:09 +0000 (17:21 -0400)] 
fix CAST assertions for SQLA 1.4

SQLAlchemy 1.4 labels CAST expressions as the name of the column,
adjust for this.

Change-Id: I208427e9301de224bc108bd97bde4c203faf8196

5 years agoDrop python 3.4 support
Mike Bayer [Fri, 30 Aug 2019 17:51:44 +0000 (13:51 -0400)] 
Drop python 3.4 support

mysqlclient is no longer working in Python 3.4, and as pip is also
emitting warnings for dropped support, in order to maintain CI
we need to drop Python 3.4.  Also include 3.7, 3.8 in classifiers.

Change-Id: I6fb2514934b6133d2a484621a0d7003b424c66f4

5 years agoVersion 1.1.1 placeholder
Mike Bayer [Tue, 27 Aug 2019 00:03:56 +0000 (20:03 -0400)] 
Version 1.1.1 placeholder

5 years ago- 1.1.0 rel_1_1_0
Mike Bayer [Mon, 26 Aug 2019 23:47:13 +0000 (19:47 -0400)] 
- 1.1.0

5 years agofix typo
Mike Bayer [Mon, 26 Aug 2019 23:45:43 +0000 (19:45 -0400)] 
fix typo

Change-Id: I2f11c0a3132f9f89979a4a213b5e2cc69993ee4b

5 years agochange dist-html to use cp
Mike Bayer [Mon, 26 Aug 2019 23:41:58 +0000 (19:41 -0400)] 
change dist-html to use cp

for unknown reasons sphinx is suddenly having a problem with the
_static directory being moved a directory upwards, so change how
dist-html works to just build normally then move files

Change-Id: I3f1c7260975c91c90a8e1ffb16ecb481aa3a583f

5 years agoAdd clear_envs to these tests
Mike Bayer [Mon, 26 Aug 2019 23:23:10 +0000 (19:23 -0400)] 
Add clear_envs to these tests

Change-Id: If7dd0d6d1a19a3c112c1e13d7d744b1423a4ce28

5 years agoremove python setup.py test
Mike Bayer [Mon, 26 Aug 2019 22:46:29 +0000 (18:46 -0400)] 
remove python setup.py test

Removed the "python setup.py test" feature in favor of a straight run of
"tox".   Per Pypa / pytest developers, "setup.py" commands are in general
headed towards deprecation in favor of tox.  The tox.ini script has been
updated such that running "tox" with no arguments will perform a single run
of the test suite against the default installed Python interpreter.

.. seealso::

    https://github.com/pypa/setuptools/issues/1684

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

Change-Id: Ib92ef8d20ad0e6f1e1b9d25051b788788cc69b02
Fixes: #592
5 years agoRecipe for ignoring connection tables that aren't in the metadata
Mike Bayer [Sun, 25 Aug 2019 22:49:19 +0000 (18:49 -0400)] 
Recipe for ignoring connection tables that aren't in the metadata

Change-Id: Ic4e4feb8fa1407eaa69166d06043afaba0824a50

5 years agoInclude existing_comment in MySQLChangeColumn
Mike Bayer [Sat, 24 Aug 2019 02:23:00 +0000 (22:23 -0400)] 
Include existing_comment in MySQLChangeColumn

Fixed issue where emitting a change of column name for MySQL did not
preserve the column comment, even if it were specified as existing_comment.

Change-Id: I93a63e5b7c4b629e42088242a9be345de94aa6ea
Fixes: #594
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