summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-11-21 15:29:33 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2014-11-21 15:29:33 -0500
commit95545a674f3736b42a5878b2c799df02dc7890e3 (patch)
tree5856ed02e9488afb65f5c1ab15cbe6cdf9aad7f4
parent360b8b98da0ba308e04938916908329e4d0d90dc (diff)
downloadalembic-95545a674f3736b42a5878b2c799df02dc7890e3.tar.gz
- add more label syntaxes
-rw-r--r--docs/build/tutorial.rst20
1 files changed, 20 insertions, 0 deletions
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
---------------------------