summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Reproducer for ↵reproduce_pytest_196Mike Bayer2017-08-042-4/+4
| | | | | | | | | | | | | https://github.com/pytest-dev/pytest-xdist/issues/196#issuecomment-320262736 Two tests in test_postgresql.py intentionally fail under SQLAlchemy < 1.1, illustrating the pytest-xdist crash. Run as: tox -e py27-sqla10-sqlite -- tests/test_postgresql.py Change-Id: I2811f54a0143c4dd132f072b3bc96d4f0f6088d8
* Add support for kw to DROP INDEX, test postgresql_concurrentlyMike Bayer2017-08-043-6/+48
| | | | | Change-Id: I89c98401d3e1f1252041b622e045c6dc85fa59a1 Fixes: #424
* Pin to pytest<=3.0.7 pytest-xdist<=1.16.0Mike Bayer2017-08-041-2/+2
| | | | | | Until https://github.com/pytest-dev/pytest-xdist/issues/196 is fixed Change-Id: I35004dd8bea240b7d91d72f2ea86cb732fe861e0
* - 0.9.5. setupMike Bayer2017-08-034-4/+20
| | | | | | - changelog file setup Change-Id: I1edd9e055740c9826c4f89d6d74fb12f5e3f58ce
* - 0.9.4rel_0_9_4Mike Bayer2017-07-311-0/+1
|
* address stamp issues in on_version_apply callbackjpassaro2017-07-183-22/+81
| | | | | | | | | | * add callback tests with stamp present * fix bug in stamp MigrationInfo construction * adjust MigrationInfo API to reflect existence of stamps with multiple up revisions Change-Id: I308d1de7854542d4d12bcc743bb5ed7e8e2fbefc Pull-request: https://bitbucket.org/zzzeek/alembic/pull-requests/68
* - 0.9.4 setupMike Bayer2017-07-172-1/+4
| | | | Change-Id: Id951f3ff26b34a03a519b634d1cd7cbf0223f849
* - 0.9.3rel_0_9_3Mike Bayer2017-07-061-1/+1
|
* - fix some sphinx link stuffMike Bayer2017-07-064-7/+10
|
* expose on_version_apply callback to context usersJohn Passaro2017-07-036-7/+231
| | | | | Change-Id: I694e26f7d161dcaf4f035277c8317ff6ffe41680 Pull-request: https://bitbucket.org/zzzeek/alembic/pull-requests/67
* Adjust for Variant returning itself as implMike Bayer2017-06-026-1/+60
| | | | | | | | | | Fixed bug where autogen comparison of a :class:`.Variant` datatype would not compare to the dialect level type for the "default" implementation of the :class:`.Variant`, returning the type as changed between database and table metadata. Change-Id: Ie94779ece9f1c768375cdbdc4124c98f9c11bb86 Fixes: #433
* - add dateutil to docs requirements so that all autodocMike Bayer2017-06-011-0/+1
| | | | | | modules can import Change-Id: I9f9943bfa99ac2581cd1579549a533eddefdc191
* - Fixed unit tests to run correctly under the SQLAlchemy 1.0.x seriesMike Bayer2017-05-315-2/+18
| | | | | | | | prior to version 1.0.10 where a particular bug involving Postgresql exclude constraints was fixed. Change-Id: Ief64b19b75e4c2c3661ac95d5b03d0c8e0fe5619 Fixes: #431
* - 0.9.3 setupMike Bayer2017-05-312-1/+5
| | | | Change-Id: I151d45645826badad0d398d5178a468f50fb8234
* - 0.9.2rel_0_9_2Mike Bayer2017-05-181-1/+1
|
* Don't use schema with second argument, SQL Server sp_renameMike Bayer2017-05-183-8/+36
| | | | | | | | | | | | Repaired :meth:`.Operations.rename_table` for SQL Server when the target table is in a remote schema, the schema name is omitted from the "new name" argument. Also added some extra tests for sp_rename w/ quoting / case sensitive names. Change-Id: I411b32d0c5bba5a466c0b5d6a412c1b7541fdc95 Fixes: #429
* Add timezone option to configMike Bayer2017-04-068-5/+139
| | | | | | | | | Using dateutil.tz to link string names to tzinfo objects, the create_date can now generate using a named timezone rather than datetime.now(). Change-Id: I9f151cb9e11da3d68be63d7141f60e7eccb9812c Fixes: #425
* Apply DDLCompiler name rules to Index for autogenerateMike Bayer2017-03-154-1/+49
| | | | | | | | | | | | The autogenerate compare scheme now takes into account the name truncation rules applied by SQLAlchemy's DDL compiler to the names of the :class:`.Index` object, when these names are dynamically truncated due to a too-long identifier name. As the identifier truncation is deterministic, applying the same rule to the metadata name allows correct comparison to the database-derived name. Change-Id: I270fbde4430a41f4bcc7857f1932347d86f07675 Fixes: #421
* - fix the import hereMike Bayer2017-03-151-1/+1
| | | | Change-Id: I63fa57218fcc8f3d15c213c8adf61c9761cb9764
* - add custom css alsoMike Bayer2017-03-152-0/+2
| | | | Change-Id: I163f3f644e88460cdb5203e8a55944436c06d00b
* - add custom sidebar fileMike Bayer2017-03-152-1/+2
| | | | Change-Id: I03078ee419882942a5891c90cef18851b53f905b
* Warn on non-Connection present and accommodate for EngineMike Bayer2017-03-043-5/+76
| | | | | | | | | | | | | | A warning is emitted when an object that's not a :class:`~sqlalchemy.engine.Connection` is passed to :meth:`.EnvironmentContext.configure`. For the case of a :class:`~sqlalchemy.engine.Engine` passed, the check for "in transaction" introduced in version 0.9.0 has been relaxed to work in the case of an attribute error, as some users appear to be passing an :class:`~sqlalchemy.engine.Engine` and not a :class:`~sqlalchemy.engine.Connection`. Change-Id: I95ef38955c00511d3055362a03284fb91677595f Fixes: #419
* - 0.9.2 setupMike Bayer2017-03-042-1/+5
| | | | Change-Id: I4459aeef0028c89ac1c30e79cbceefe3b0c27f64
* - 0.9.1rel_0_9_1Mike Bayer2017-03-011-1/+1
|
* Don't raise on open transaction if we already started in oneMike Bayer2017-03-013-2/+44
| | | | | | | | | | An adjustment to the bug fix for :ticket:`369` to accommodate for env.py scripts that use an enclosing transaction distinct from the one that the context provides, so that the check for "didn't commit the transaction" doesn't trigger in this scenario. Change-Id: I3c1fa614495b61532999a84b2af3773e4d33c30b Fixes: #417
* - setup for 0.9.1Mike Bayer2017-03-012-1/+5
| | | | Change-Id: I84fa995b7c029404988f04df4fa1460c4409c7da
* - 0.9.0rel_0_9_0Mike Bayer2017-02-281-1/+1
|
* - provide param docstrings for all of commandMike Bayer2017-02-273-13/+161
| | | | | | - add cross-linking for process_revision_directives Change-Id: I88914df056d720207c781501934893ec8e030610
* Allow target_metadata to be a sequenceMike Bayer2017-02-238-22/+196
| | | | | | | | | | | The :paramref:`.EnvironmentContext.configure.target_metadata` parameter may now be optionally specified as a sequence of :class:`.MetaData` objects instead of a single :class:`.MetaData` object. The autogenerate process will process the sequence of :class:`.MetaData` objects in order. Change-Id: I6485c05d68219ff7af1611b34550487d316e0242 Fixes: #38
* Detect open transaction at end of migration w/ transactional_ddl=FalseMike Bayer2017-02-233-3/+133
| | | | | | | | | | | | A :class:`.CommandError` is now raised when a migration file opens a database transaction and does not close/commit/rollback, when the backend database or environment options also specify transactional_ddl is False. When transactional_ddl is not in use, Alembic doesn't close any transaction so a transaction opened by a migration file will cause the following migrations to fail to apply. Change-Id: I7a9baf18837deb193d9ddc6813955909484d4945 Fixes: #369
* Apply subtype repr logic to JSON/JSONBMike Bayer2017-02-223-3/+71
| | | | | | | | | | | | | | Fixed bug where Postgresql JSON/JSONB types rendered on SQLAlchemy 1.1 would render the "astext_type" argument which defaults to the ``Text()`` type without the module prefix, similarly to the issue with ARRAY fixed in :ticket:`85`. Also modifies the ARRAY approach from :ticket:`85` to be regular expression based for safer targeting of the inner repr() type. Change-Id: I66d51301f4bf5b747b5e8da26a83cbff075d71b2 Fixes: #411
* Merge "Add ExcludeConstraint support for Postgresql"mike bayer2017-02-229-24/+392
|\
| * Add ExcludeConstraint support for PostgresqlMike Bayer2017-02-229-24/+392
| | | | | | | | | | | | | | | | | | | | | | | | Add full support for Postgresql add_exclude_constraint(). This opens up more of the operations API and serves as a model for other dialect-specific constraints. Additionally, gracefully degrade if a given constraint class is not supported with a warning. Fixes: #412 Change-Id: I0fb89c840518aaeae97929919356f944479bc756
* | Detect and render autoincrement for alter_column()Mike Bayer2017-02-228-5/+245
|/ | | | | | | | | | | | | | | | | | The ``autoincrement=True`` flag is now rendered within the :meth:`.Operations.alter_column` operation if the source column indicates that this flag should be set to True. The behavior is sensitive to the SQLAlchemy version in place, as the "auto" default option is new in SQLAlchemy 1.1. When the source column indicates autoincrement as True or "auto", the flag will render as True if the original column contextually indicates that it should have "autoincrement" keywords, and when the source column explcitly sets it to False, this is also rendered. The behavior is intended to preserve the AUTO_INCREMENT flag on MySQL as the column is fully recreated on this backend. Note that this flag does **not** support alteration of a column's "autoincrement" status, as this is not portable across backends. Change-Id: I746c4841752adf9342bfdca7c9255aae5110b2ef Fixes: #413
* Add process_revision_directives param to command.revision()Mike Bayer2017-02-226-9/+107
| | | | | | | | | | This allows programmatic use of command.revision() to specify an ad-hoc process_revision_directives callable, rather than having it placed via the env.py script. Co-authored-by: Tyson Holub Change-Id: Ief1c11fd2a6f10e712851145d6d190a3b167817c Pull-request: https://github.com/zzzeek/alembic/pull/35
* Fix postgresql automigration for ARRAY typesPaul2017-02-215-3/+76
| | | | | | | | | | | | Adds a new codepath into render._repr_type() that will consult the dialect impl for specific types. On the postgresql side, the exisiting repr() is combined with a replace featuring the full autogen render of the nested type. Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Fixes: #85 Change-Id: I8796bfeea27d48e6f8bb5ea4562bdc04961ba0d5 Pull-request: https://github.com/zzzeek/alembic/pull/38
* - import adjusted for older SQLAMike Bayer2017-02-211-1/+1
| | | | Change-Id: I998c65f8c9b2901adf02cf6796e9940fae630309
* - fixMike Bayer2017-02-211-1/+1
| | | | Change-Id: I477ecc68baea7997c00904f0647f50cf15bfe50f
* - call this 0.9.0, as there are some slight architectural changesMike Bayer2017-02-212-2/+2
| | | | | | coming Change-Id: I98d8edf6b05281bfbc4f3a4338f02084a759a9f8
* - move Postgresql-related render tests to the test_postgresql suiteMike Bayer2017-02-212-61/+71
| | | | Change-Id: I5e5659739269284c41bc9a7ae3127fb5d72d108f
* Ensure schema names also compared in foreign_key_constraint()Konstantin Lebedev2017-02-203-1/+19
| | | | | | | | | | Fixed bug in :func:`.ops.create_foreign_key` where the internal table representation would not be created properly if the foriegn key referred to a table in a different schema of the same name. Pull request courtesy Konstantin Lebedev. Change-Id: I494c95d02aedbfec3b6318d069322b544cf018fb Pull-request: https://github.com/zzzeek/alembic/pull/36
* - 0.8.11 bump changelog alsoMike Bayer2017-02-201-0/+4
| | | | Change-Id: I3a1b149a8b04097d0f3eb56d94add322f87903a7
* Fix link in batch alter_column docHemanth Makkapati2017-02-131-1/+1
| | | | Refer to Operations.alter_column instead of Operations.add_column
* - 0.8.11 dev bumpMike Bayer2017-01-251-1/+1
| | | | Change-Id: I2fdac1caaef103919e373537f9db297b058a7543
* - add a note that alter_column->postgresql_using is raw SQL,Mike Bayer2017-01-251-1/+3
| | | | | | fixes #408 Change-Id: Ia569191d43d49178f78a7bcef458b671f750583e
* - add a new section "Run Multiple Alembic Environments from one .ini file",Mike Bayer2017-01-234-1/+68
| | | | | | | clarify what the --name flag does and how this differs from "multiple bases". Change-Id: If65a8a11802db18bc2f42ffea360c70cbc9113bb
* - 0.8.10rel_0_8_10Mike Bayer2017-01-171-0/+1
|
* Update pytest section in setup.cfgMike Bayer2017-01-172-2/+1
| | | | | | | Uses new [tool:pytest] directive. Also removes tox minversion as we are well ahead of that version. Change-Id: I32c767b8daa64c9e8d71a68c4f568d275719c7d7
* Add primary key constraint to alembic_versionMike Bayer2017-01-135-6/+64
| | | | | | | | | | | | | | The alembic_version table, when initially created, now establishes a primary key constraint on the "version_num" column, to suit database engines that don't support tables without primary keys. This behavior can be controlled using the parameter :paramref:`.EnvironmentContext.configure.version_table_pk`. Note that this change only applies to the initial creation of the alembic_version table; it does not impact any existing alembic_version table already present. Change-Id: Ic947f0f97373b2e6695e06c9b2ad6c8a9789fcb2 Fixes: #406
* Merge "- test py36 - Current mysqlclient does not accept "bytes" on py3k, ↵mike bayer2017-01-122-2/+5
|\ | | | | | | SQLAlchemy 0.9 still lists this client (the original mysqldb version) as "supports_unicode_statements=False" so is no longer functional on py3k. - Rollback transaction after table drop; it seems py3.6 sqlite3 suddenly turned on transactional DDL for SQLite"