summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Version 1.11.2 placeholderHEADmainMike Bayer2023-05-172-1/+5
|
* - 1.11.1rel_1_11_1Mike Bayer2023-05-175-40/+43
|
* typosMike Bayer2023-05-171-2/+4
| | | | Change-Id: I3946d5afc0fb876424659356a6b0e49f3ee5a8bc
* Merge "Define type for generic classes" into mainmike bayer2023-05-1718-55/+78
|\
| * Define type for generic classesFederico Caselli2023-05-1618-55/+78
| | | | | | | | | | | | | | | | Fixed typing use of :class:`~sqlalchemy.schema.Column` and other generic SQLAlchemy classes. Fixes: #1246 Change-Id: I5ee80395d626894a52e3395c9986213289576355
* | Merge "restore drop_index.table_name, drop_constraint.type_ as positional" ↵mike bayer2023-05-1710-11/+106
|\ \ | |/ |/| | | into main
| * restore drop_index.table_name, drop_constraint.type_ as positionalMike Bayer2023-05-1610-11/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | These two API changes were identified as having legacy use patterns and should be revisited using a deprecation warning for removal in either 1.12 or 1.13. Add documentation re: Alembic not using semver, fix incorrect calling signature example in batch documentation. Change-Id: I33dc5a8d058bcce77591bb037ae964e626a3387f Fixes: #1243 Fixes: #1245
* | restore Dict[str, str] as potential get_section() typeMike Bayer2023-05-162-5/+28
|/ | | | | | | | | | Restored the output type of :meth:`.Config.get_section` to include ``Dict[str, str]`` as a potential return type, which had been changed to immutable ``Mapping[str, str]``. When a section is returned and the default is not used, a mutable dictionary is returned. Change-Id: I6e2c67f00222d7a2b388f9294c5336fd8e2dec94 Fixes: #1244
* Version 1.11.1 placeholderMike Bayer2023-05-152-1/+5
|
* - 1.11.0rel_1_11_0Mike Bayer2023-05-1513-110/+121
|
* 1.11.0 in changelog file; doc updatesMike Bayer2023-05-158-23/+29
| | | | Change-Id: I5098f9fe2bf57ad93f400e34d914ae0e3b45c747
* Merge "dont compare unique constraint and index sigs to each other" into mainmike bayer2023-05-123-5/+89
|\
| * dont compare unique constraint and index sigs to each otherMike Bayer2023-05-123-5/+89
| | | | | | | | | | | | | | | | | | | | Fixed regression caused by :ticket:`1166` released in version 1.10.0 which caused MySQL unique constraints with multiple columns to not compare correctly within autogenerate, due to different sorting rules on unique constraints vs. indexes, which in MySQL are shared constructs. Change-Id: I5687dde95281f237fd73367d145b9c62e2576a3a Fixes: #1240
* | Improve commit 497c6c86b9547eed2ac297b1618300430578b86fFederico Caselli2023-05-123-8/+51
| | | | | | | | | | | | | | Follow up of I91b453c8848dc5d24d63840bfd7ce4d22dd0e693 to improve some leftover changes. Change-Id: I368b93df4d8bd6782b04042ab7872276ff00e56b
* | Merge "add user_module_prefix param for render_python_code" into mainmike bayer2023-05-123-3/+57
|\ \
| * | add user_module_prefix param for render_python_codetangkikodo2023-05-123-3/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue where :func:`.autogenerate.render_python_code` function did not provide a default value for the ``user_module_prefix`` variable, leading to ``NoneType`` errors when autogenerate structures included user-defined types. Added new parameter :paramref:`.autogenerate.render_python_code.user_module_prefix` to allow this to be set as well as to default to ``None``. Pull request courtesy tangkikodo. Fixes #1235 Closes: #1233 Pull-request: https://github.com/sqlalchemy/alembic/pull/1233 Pull-request-sha: 6fa3bc1ce4f2130bf7a28282a84e3bb9a3223304 Change-Id: Ic21eec87f373a9518513a6a308f16e5d2b5ebf81
* | | Merge "Added ``op.run_async``." into mainmike bayer2023-05-127-3/+134
|\ \ \ | |_|/ |/| |
| * | Added ``op.run_async``.Federico Caselli2023-05-127-3/+134
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Added :meth:`.Operations.run_async` to the operation module to allow running async functions in the ``upgrade`` or ``downgrade`` migration function when running alembic using an async dialect. This function will receive as first argument an class:`~sqlalchemy.ext.asyncio.AsyncConnection` sharing the transaction used in the migration context. also restore the .execute() method to BatchOperations Fixes: #1231 Change-Id: I3c3237d570be3c9bd9834e4c61bb3231bfb82765
* | Merge "keyword only arguments in ops" into mainmike bayer2023-05-129-26/+116
|\ \
| * | keyword only arguments in opsMike Bayer2023-05-119-26/+116
| |/ | | | | | | | | | | | | | | | | | | Argument signatures of Alembic operations now enforce keyword-only arguments as passed as keyword and not positionally, such as :paramref:`.Operations.create_table.schema`, :paramref:`.Operations.add_column.type_`, etc. Change-Id: I91b453c8848dc5d24d63840bfd7ce4d22dd0e693 Fixes: #1130
* | Removed server default quoting from compareFederico Caselli2023-05-116-14/+55
|/ | | | | | | | | | | Don't modify the metadata server default when comparing it in the autogenerate process. This impacts the value passes to user provided functions passed in :paramref:`.EnvironmentContext.configure.compare_server_default` and third party dialect that implement a custom ``compare_server_default``. Fixes: #1178 Change-Id: Ib429efcf9077337f768ad5aad91659867e89391a
* Merge "Fix compat issue with older SQLAlchemy versions." into mainmike bayer2023-05-097-27/+30
|\
| * Fix compat issue with older SQLAlchemy versions.Federico Caselli2023-05-097-27/+30
| | | | | | | | | | | | | | | | | | | | | | Added placeholder classes for ``Computed`` and ``Identity`` when older 1.x SQLAlchemy versions are in use, namely prior to SQLAlchemy 1.3.11 when the ``Computed`` construct was introduced. Previously these were set to None, however this could cause issues with certain codepaths that were using ``isinstance()`` such as one within "batch mode". Fixes: #1237 Change-Id: I033712158baa68cca6a56bd41d0636109e156b86
* | Add Operations and BatchOperations stub methodsCaselIT2023-05-0411-193/+1672
|/ | | | | | | | | | | | | Updated stub generator script to also add stubs method definitions for the :class:`.Operations` class and the :class:`.BatchOperations` class obtained from :meth:`.Operations.batch_alter_table`. Repaired the return signatures for :class:`.Operations` that mostly return ``None``, and were erroneously referring to ``Optional[Table]`` in many cases. Fixes: #1093 Change-Id: I98d38dd5a1e719b4dbbc1003746ec28f26c27808
* Merge "Added quiet option to command line" into mainFederico Caselli2023-05-0413-77/+129
|\
| * Added quiet option to command lineCaselIT2023-04-2813-77/+129
| | | | | | | | | | | | | | | | | | Added quiet option to the command line, using the ``-q/--quiet`` option. This flag will prevent alembic from logging anything to stdout. Fixes: #1109 Change-Id: I7d9fac05d93e07efaefd87a582a7e785891798ef
* | Merge "Fix ExcludeConstraint with func." into mainmike bayer2023-05-033-37/+62
|\ \
| * | Fix ExcludeConstraint with func.Federico Caselli2023-04-283-37/+62
| |/ | | | | | | | | | | | | | | | | Fix autogenerate issue with PostgreSQL :class:`.ExcludeConstraint` that included sqlalchemy functions. The function text was previously rendered as a plain string without surrounding with ``text()``. Fixes: #1230 Change-Id: I0d59e04d5a64132ed86f92a27e4247ac9703f3e0
* | Merge "Replace find with find_namespace in setuptools config." into mainmike bayer2023-04-301-1/+2
|\ \
| * | Replace find with find_namespace in setuptools config.Federico Caselli2023-04-241-1/+2
| | | | | | | | | | | | | | | | | | | | | This removes a warning from setuptools Fixes: #1227 Change-Id: I81187e86038836ded39140076f25dc5f6bc1eb35
* | | document constraint behavior for add_column()Mike Bayer2023-04-292-20/+78
| |/ |/| | | | | | | | | | | | | | | note which constraints are generated from Column (nullable, single column FOREIGN KEY) and which are not (PRIMARY KEY, CHECK, UNIQUE, etc.). Change-Id: I030f2b4e17b08a63e0543567cf01ba03e8752d79 Fixes: #1232
* | Followup / fixup: apply 'black' code formatting to a couple of missed docstringsJames Addison2023-04-263-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ### Description Follow-up / completion of #1220. That change updated a number of docstrings within the codebase to use standardised `black` code formatting, but a couple of locations had been missed. ### Checklist This pull request is: - [x] A documentation / typographical error fix - Good to go, no issue or tests are needed Closes: #1228 Pull-request: https://github.com/sqlalchemy/alembic/pull/1228 Pull-request-sha: f5696b9ca34998e22af5705434ed2393d86e82c0 Change-Id: I5d935b036d6f4e11eb5c229f9982db587d67ae24
* | Consistency: apply codestyle formatting to docstring code snippetsJames Addison2023-04-258-177/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ### Description This is a pedantic/consistency follow-up from #1219: that change applied some `black` formatting to two code snippets, and this change applies that formatting to the remaining snippets in the codebase. For each snippet, I extracted the code and applied formatting using `black` v23.1.0, then placed the results back into the source. In one case there was an associated 'output' block, and in that case I re-ran the snippet code to update the results of that output too (this included a [change-in-output](https://github.com/sqlalchemy/alembic/compare/main...openculinary:alembic:docstrings/snippet-format-consistency?expand=1#diff-bf4756660cdb31ee8566a2cff72526671356c38a725195723ce0e65e6c11e6cfR124) thanks to a [bugfix since the snippet was written](https://github.com/sqlalchemy/alembic/commit/bc6971aa4abdafb7e1a1123c26a373cc25a34ca9), by the looks of it). ### Checklist This pull request is: - [x] A documentation / typographical error fix Closes: #1220 Pull-request: https://github.com/sqlalchemy/alembic/pull/1220 Pull-request-sha: cd65a453192546a660d6f5ebad5af08bb1c72af4 Change-Id: I6758445633c364c8fb2f4d8376d83607430a36d6
* | Merge "Improve typing." into mainmike bayer2023-04-2514-72/+121
|\ \ | |/ |/|
| * Improve typing.Federico Caselli2023-04-1314-72/+121
| | | | | | | | | | | | | | | | Correctly pass previously ignored arguments ``insert_before`` and ``insert_after`` in ``batch_alter_column`` Fixes: #1221 Change-Id: I79c9144f3e521fca00a0c32462ae2a69f9f7a032
* | rename upload-dir to upload_dir to silence setuptool warningFederico Caselli2023-04-241-1/+1
| | | | | | | | Change-Id: I048cc0653de1b7885665b747cceb083d348f7f18
* | add missing tag to 1.10.4 changelogFederico Caselli2023-04-241-1/+1
| | | | | | | | Change-Id: Ifbec22c07ce887f4e25d25ad47aff44dcbae366b
* | Version 1.10.5 placeholderMike Bayer2023-04-242-1/+5
| |
* | - 1.10.4rel_1_10_4Mike Bayer2023-04-244-18/+20
|/
* Fix type annotation in `op.create_table_comment`Colin Adams2023-04-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ### Description The `existing_comment` parameter had type `None`, but it should be `Optional[str]`. Fixes #903 ### Checklist This pull request is: - [x] A documentation / typographical error fix - Good to go, no issue or tests are needed - [ ] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. **Have a nice day!** Closes: #1115 Pull-request: https://github.com/sqlalchemy/alembic/pull/1115 Pull-request-sha: 973ca93b199dccf4474db650bcfee797b2bf7c51 Change-Id: Ic4a25e320fe3e4578e3df9aea689d760844c055e
* tooling: write_pyi.py: filter usage of raw-strings (rstrings)James Addison2023-04-125-59/+63
| | | | | | | | | | | | | | | | | | | | | | | | ### Description While reading the diff between [`rel_1_10_2...rel_1_10_3`](https://github.com/sqlalchemy/alembic/compare/rel_1_10_2...rel_1_10_3), the introduction of r-strings drew my attention, and that resulted in some [discussion on the relevant commit](https://github.com/sqlalchemy/alembic/commit/bc0c305b7c2cc0401e250fcd6a725aacecdd6e33). This changeset filters the production of r-strings during stub-generation to cases where docstrings contain escape (backslash, `\`) characters. I'll admit that I didn't realize until today that these stubs are primarily for typechecking. Since that's the case, I have doubts about whether the change is worthwhile (consistency and simplicity -- using r-strings for all docstrings in the stubs -- even if it's redundant, seems fine to me). ### Checklist This pull request is: - [x] A documentation / typographical error fix - [x] A short code fix - Relates to discussion at https://github.com/sqlalchemy/alembic/commit/bc0c305b7c2cc0401e250fcd6a725aacecdd6e33 Closes: #1218 Pull-request: https://github.com/sqlalchemy/alembic/pull/1218 Pull-request-sha: 352ab8829525435f78838687e12156a3fa3a3d86 Closes: #1219 Pull-request: https://github.com/sqlalchemy/alembic/pull/1219 Change-Id: I2808a592681dabc093d538f589e673fcc5e05822
* Merge "Use column sort in index compare on postgresql" into mainmike bayer2023-04-105-92/+305
|\
| * Use column sort in index compare on postgresqlCaselIT2023-04-105-92/+305
| | | | | | | | | | | | | | | | Added support for autogenerate comparison of indexes on PostgreSQL which include SQL sort option, such as ``ASC`` or ``NULLS FIRST``. Fixes: #1213 Change-Id: I3ddcb647928d948e41462b1c889b1cbb515ace4f
* | uniquify cols for FK table objectMike Bayer2023-04-073-1/+28
|/ | | | | | | | | | | Fixed issue where using a directive such as ``op.create_foreign_key()`` to create a self-referential constraint on a single table where the same column were present on both sides (e.g. within a composite foreign key) would produce an error under SQLAlchemy 2.0 and a warning under SQLAlchemy 1.4 indicating that a duplicate column were being added to a table. Change-Id: I2a8f5d8def2714792bffcdfb8bf88a5080ec8ce7 Fixes: #1215
* Version 1.10.4 placeholderMike Bayer2023-04-052-1/+5
|
* - 1.10.3rel_1_10_3Mike Bayer2023-04-054-16/+18
|
* Merge "Fix issues in autogenerate of function index removal" into mainmike bayer2023-04-047-176/+113
|\
| * Fix issues in autogenerate of function index removalCaselIT2023-04-047-176/+113
| | | | | | | | | | | | | | | | Fixed error raised by alembic when running autogenerate after removing a function based index. Fixes: #1212 Change-Id: Idc565d661229afda89d44e36786bb0357323e604
* | Merge "Fix type annotation for `url`" into mainmike bayer2023-04-034-3/+7
|\ \ | |/ |/|
| * Fix type annotation for `url`Viicos2023-04-024-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <!-- Provide a general summary of your proposed changes in the Title field above --> Left the `pyi` generated file untouched. ### Description <!-- Describe your changes in detail --> ### Checklist <!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once) --> This pull request is: - [x] A documentation / typographical error fix - Good to go, no issue or tests are needed - [ ] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. **Have a nice day!** Closes: #1209 Pull-request: https://github.com/sqlalchemy/alembic/pull/1209 Pull-request-sha: d15cb6e28d5bb934d139ced87e713a9d77505346 Change-Id: I8548806a693b150f1417a102e6498119524008a0