summaryrefslogtreecommitdiff
path: root/docs/build/cookbook.rst
Commit message (Collapse)AuthorAgeFilesLines
* Add docs for data migrationsVlastimil Zíma2023-04-021-0/+43
| | | | | | | | | | | | | | | | | | | | | | | ### Description I added a small docs regarding data migrations, based on #972. ### 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 **Have a nice day!** Closes: #1040 Pull-request: https://github.com/sqlalchemy/alembic/pull/1040 Pull-request-sha: c985e0d8096e750df35aa07dde71f432a57656b6 Change-Id: Icf6fdb1089eb7c386dad4401b99caaddc352d92f
* Follow up Ia98c8f9a93953f049378f5029e355a3f249ed638CaselIT2023-02-141-38/+8
| | | | | | that was merged prematurely Change-Id: I131dfb8dabf10457954f5216b1abadc976aebd38
* Include missing part of env.pySam Bull2023-02-131-12/+12
| | | | | | | | | | | This part is missing from the example, and if a user started with the async template, then they would have an `asyncio.run()` call in here, which breaks the script. Fixes: #1174 Closes: #1172 Pull-request: https://github.com/sqlalchemy/alembic/pull/1172 Pull-request-sha: fa2c55319d09fab4e1435433fa2d7e5fca5dc820 Change-Id: Ia98c8f9a93953f049378f5029e355a3f249ed638
* Add commit to cookbook exampleCaselIT2023-01-111-0/+2
| | | | | | | | A commit is now required to end the transaction before start executing the migration Fixes: #1150 Change-Id: I704db15155454dafed9d15f768b97f8e2ebfff81
* Updated cookbook docs (#1111)Amel Alispahic2022-11-071-2/+2
|
* fix search path indicatorMike Bayer2022-10-171-1/+3
| | | | | Change-Id: I341a57f0bbf7c237c86cb8de4c94a37d737c3c85 Fixes: #1096
* docs(cookbook): add note on including info object on declarative tables (#1051)Jack Michaud2022-06-071-0/+6
|
* illustrate connection sharing + asyncioMike Bayer2022-02-151-11/+86
| | | | | | | References: #991 : Change-Id: I4d1d738ab27a541618762240888dd45284867720
* repair sharing exampleMike Bayer2022-02-151-12/+13
| | | | | | | | | | | | the note re: "we dont have to guess" is wrong. engine_from_config() returns an engine. It seems like this example was edited a few times and was not completely checked (it was me, for sure). for now just use two separate blocks to eliminate any problems Change-Id: Ib44671526d0f570ed88dd3b1c77d078c1afbf3eb
* add missing import in asyncion cookbook exampleCaselIT2021-12-211-1/+3
| | | | Change-Id: Idda470d2aa7df298e5553359be1ced07e2c112d0
* docs: Add missing engine.dispose() call to the asyncio cookbook example. (#973)DanCardin2021-12-211-0/+2
|
* [DOCS]: Remove suggestion to use branched connectionsChris Sewell2021-09-111-21/+12
| | | Fixes #908
* Drop compatibility with python 2.7.CaselIT2021-06-221-53/+1
| | | | | | Now alembic supports only python from version 3.6. Change-Id: Iccf124c2d74af801d90a16c9003cdad318768625
* Add async template to AlembicCaselIT2021-02-261-0/+58
| | | | | | | | | Add async template to Alembic to bootstrap environments that use async DBAPI. Updated the cookbook to include a migration guide on how to adapt an existing enviroment for use with DBAPI drivers. Fixes: #805 Change-Id: I5281b95ce8d48a31591902116c746ef9ae3fd7af
* Update cookbook.rst references to #753Andrew Fitzgerald2021-02-051-4/+4
| | | | A fix for #753 was merged in November 2020 and released in 1.5.0 in January 2021. This updates the references to #753 in cookbook.rst to note that a fix for #753 has been released.
* remove all .. version(?:changed|added):: prior to 1.0Mike Bayer2021-01-181-2/+0
| | | | Change-Id: I2a1a0c273adc871b12e13d7f913609fe1122dab3
* documentation fixesMike Bayer2021-01-151-0/+1
| | | | Change-Id: I1f2e8376ce86886a9b35fa48cb7a78ca1735095c
* Add cookbook recipe illustrating autogenerate->invoke directlyMike Bayer2020-11-051-0/+121
| | | | Change-Id: I46c0436971f50c0969f70ecf99c191533db65dcf
* Add interim recipe for multi-tenantMike Bayer2020-09-291-0/+108
| | | | | | | | | | Alembic does not have a multi-tenant story right now. for the schema use case, search_path represents the best way to make it happen at a rudimental level. Document the basic idea for this as it is known to work for the moment. Change-Id: I14f8eebc285f67bc374eb829e5fce49dc5820c9c References: #555
* Add link to Alembic Utils as an example of replaceable objects.Mike Bayer2020-04-271-0/+8
| | | | | Change-Id: I9f8f423a363970814d2ca5fea2c0b2c35c34d19d References: #686
* Add custom table column sorting exampleMike Bayer2020-03-031-0/+96
| | | | Change-Id: Ie953ba34ed8e6cbf90e3070494279174ebca5d1a
* Recipe for ignoring connection tables that aren't in the metadataMike Bayer2019-08-251-0/+33
| | | | Change-Id: Ic4e4feb8fa1407eaa69166d06043afaba0824a50
* Add cookbook recipe for non-ascii migration files under python 2Mike Bayer2019-07-031-0/+53
| | | | | | | | | | | 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
* ReplaceableObject: change `self.view` to `self.target`William Weiskopf2019-06-281-1/+1
|
* Add database freshness check cookbook recipem-aciek2019-05-141-0/+32
| | | | | | | | Change-Id: Iefeaadefafa286dbdb50d3034549284ee31f6623 Fixes: #559 Closes: #560 Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> (cherry picked from commit 81a595598f352b4f93cdf849df7d96ab3b1fc8af)
* Move to github, new domain, sqlalchemy linksMike Bayer2018-11-261-1/+1
| | | | | | | Alembic is now under the sqlalchemy.org domain for the website and all repos are moving under github.com/sqlalchemy. Change-Id: Id9ce08b61ed0ccdf50396f911838b21112e61652
* Add recipe for generating Python code for existing tablesMike Bayer2018-03-281-0/+74
| | | | Change-Id: Ia54f1a383d3b9ee32963f33276025bf8ae11d003
* Add cookbook recipe for don't render DROP INDEXMike Bayer2017-11-281-0/+92
| | | | | | | | Filters out DropIndexOp when there is a corresponding DropTableOp. Change-Id: I7baadf6e5b9f669c875aeeaccefb19cb5e105953 Fixes: #467
* - add a new section "Run Multiple Alembic Environments from one .ini file",Mike Bayer2017-01-231-0/+51
| | | | | | | clarify what the --name flag does and how this differs from "multiple bases". Change-Id: If65a8a11802db18bc2f42ffea360c70cbc9113bb
* Adding cookbook recipe for excluding views from migrations.Greg Krimer2016-06-211-5/+27
|
* - update Cookbook wording to reflect that it contains multiple recipes nowKonstantin Veretennicov2016-05-191-3/+2
|
* - add a cookbook recipe for don't generate if no changes,Mike Bayer2015-08-221-0/+35
| | | | references #80
* - add new recipe for "replaceable objects".Mike Bayer2015-07-271-0/+513
| | | | references #173, references #119
* - squash merge of ticket_302 branchMike Bayer2015-07-031-1/+1
| | | | | | | | | | | - The internal system for Alembic operations has been reworked to now build upon an extensible system of operation objects. New operations can be added to the ``op.`` namespace, including that they are available in custom autogenerate schemes. fixes #302 - The internal system for autogenerate been reworked to build upon the extensible system of operation objects present in #302. A new customization hook process_revision_directives is added to allow manipulation of the autogen stream. Fixes #301
* - Added a new feature :attr:`.Config.attributes`, to help with the useMike Bayer2015-01-231-0/+74
| | | | | | case of sharing state such as engines and connections on the outside with a series of Alembic API calls; also added a new cookbook section to describe this simple but pretty important use case.
* - now that branching is an enormous chapter, break out the docs intoMike Bayer2014-11-221-0/+45
| | | | | individual pages. the pages here are a little slim in the middle but overall the one-page docs were getting extremely long.
* - add new section, cookbook. First example, add conditonal sections to ↵Mike Bayer2014-03-041-0/+144
migrations within script.py.mako. fixes #177