From 7482e65a2d639a39762e398c91e3059dffc5c250 Mon Sep 17 00:00:00 2001 From: Kirsten G Date: Mon, 23 Oct 2017 13:11:50 -0700 Subject: [PATCH] Doc Fix for Alembic multiple heads error Add documentation to fix multiple heads Alembic error. Create file contributor/troubleshooting.rst and update contributor/index.rst. Closes-Bug: 1548371 Change-Id: I957bf1c7529f9409d8026f43d5fa8e04b9278d61 --- doc/source/contributor/index.rst | 1 + doc/source/contributor/troubleshooting.rst | 31 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 doc/source/contributor/troubleshooting.rst diff --git a/doc/source/contributor/index.rst b/doc/source/contributor/index.rst index 2c577c1c9a..70fcd965fb 100644 --- a/doc/source/contributor/index.rst +++ b/doc/source/contributor/index.rst @@ -14,6 +14,7 @@ project. Developer Contribution Guide Setting Up Your Development Environment Running Tempest Tests + Developer Troubleshooting Guide There are some other important documents also that helps new contributors to contribute effectively towards code standards to the project. diff --git a/doc/source/contributor/troubleshooting.rst b/doc/source/contributor/troubleshooting.rst new file mode 100644 index 0000000000..3f06b147ad --- /dev/null +++ b/doc/source/contributor/troubleshooting.rst @@ -0,0 +1,31 @@ +Developer Troubleshooting Guide +================================ + +This guide is intended to provide information on how to resolve common +problems encountered when developing code for magnum. + +Troubleshooting MySQL +----------------------- + +When creating alembic migrations, developers might encounter the ``Multiple +head revisions are present for given argument 'head'`` error. + +This can occur when two migrations revise the same head. For example, the +developer creates a migration locally but another migration has already been +accepted and merged into master that revises the same head:: + + $ alembic heads + 12345 (your local head) + 67890 (new master head) + +In order to fix this, the developer should update the down_revision of their +local migration to point to the head of the new migration in master:: + + # revision identifiers, used by Alembic. + revision = '12345' + down_revision = '67890' + +Now the newest local migration should be head:: + + $ alembic heads + 12345 (your local head)