You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/07/23 16:43:11 UTC
[GitHub] mistercrunch closed pull request #5464: Fix the build by merging
both db migrations heads
mistercrunch closed pull request #5464: Fix the build by merging both db migrations heads
URL: https://github.com/apache/incubator-superset/pull/5464
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 08547f0406..6e20d61ef5 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -505,3 +505,21 @@ https://github.com/apache/incubator-superset/pull/3013
with a PGP key and providing MD5, Apache voting, as well as
publishing to Apache's SVN repository. View the ASF docs for more
information.
+
+
+## Merging DB migrations
+
+When 2 db migrations collide, you'll get an error message like this one:
+
+```
+ alembic.util.exc.CommandError: Multiple head revisions are present for
+ given argument 'head'; please specify a specific target
+ revision, '<branchname>@head' to narrow to a specific head,
+ or 'heads' for all heads`
+```
+
+To fix it, first run `superset db heads`, this should list 2 or more
+migration hashes. Then run
+`superset db merge {PASTE_SHA1_HERE} {PASTE_SHA2_HERE}`. This will create
+a new merge migration. You can then `superset db upgrade` to this new
+checkpoint.
diff --git a/superset/migrations/versions/705732c70154_.py b/superset/migrations/versions/705732c70154_.py
new file mode 100644
index 0000000000..212f69a854
--- /dev/null
+++ b/superset/migrations/versions/705732c70154_.py
@@ -0,0 +1,22 @@
+"""empty message
+
+Revision ID: 705732c70154
+Revises: ('4451805bbaa1', '1d9e835a84f9')
+Create Date: 2018-07-22 21:51:19.235558
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '705732c70154'
+down_revision = ('4451805bbaa1', '1d9e835a84f9')
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+ pass
+
+
+def downgrade():
+ pass
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org