From 95545a674f3736b42a5878b2c799df02dc7890e3 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 21 Nov 2014 15:29:33 -0500 Subject: - add more label syntaxes --- docs/build/tutorial.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/build/tutorial.rst b/docs/build/tutorial.rst index 5787e08..423923d 100644 --- a/docs/build/tutorial.rst +++ b/docs/build/tutorial.rst @@ -394,6 +394,8 @@ Running again to ``head``:: We've now added the ``last_transaction_date`` column to the database. +.. relative_migrations: + Relative Migration Identifiers ============================== @@ -1842,6 +1844,24 @@ that includes ``ae1027a6acf``" as follows:: $ alembic revision -m "add another account column" --head ae10@head Generating /Users/classic/dev/alembic/foo/versions/55af2cb1c267_add_another_account_column.py ... done +More Label Syntaxes +^^^^^^^^^^^^^^^^^^^ + +The ``heads`` symbol can be combined with a branch label, in the case that +your labeled branch itself breaks off into multiple branches:: + + $ alembic upgrade shoppingcart@heads + +Relative identifiers, as introduced in :ref:`relative_migrations`, +work with labels too. For example, upgrading to ``shoppingcart@+2`` +means to upgrade from current heads on "shoppingcart" upwards two revisions:: + + $ alembic upgrade shoppingcart@+2 + +This kind of thing works from history as well:: + + $ alembic history -r current:shoppingcart@+2 + Working with Multiple Bases --------------------------- -- cgit v1.2.1