GitHub user dosubot[bot] added a comment to the discussion: apache super set db 
migration issue

<!-- Answer -->
Your error happens because, even though you’re on a detached HEAD at 6.0.0, 
your docker-compose setup mounts the local ./docker directory into the 
container. If your local ./docker directory is not exactly at the 6.0.0 tag 
(for example, if it’s from master or has uncommitted changes), it can override 
the migration scripts inside the Docker image, causing Alembic to fail to find 
the migration script for f5b5f88d8526 
[details](https://github.com/apache/superset/issues/32733).

To fix this:

1. Make sure your local repo is at the 6.0.0 tag and up to date:
   ```bash
   git fetch --tags
   git checkout 6.0.0
   ```
2. Remove all stopped containers and Docker volumes to clear any old state:
   ```bash
   docker compose -f docker-compose-image-tag.yaml down -v
   ```
3. Start your containers again:
   ```bash
   docker compose -f docker-compose-image-tag.yaml up
   ```

This ensures the migration scripts in ./docker match the Docker image and your 
database state, so Alembic can find f5b5f88d8526 and your container will start 
without migration errors 
[reference](https://github.com/apache/superset/issues/34284).

If you still see the error, double-check that there are no uncommitted changes 
or extra files in ./docker, and that you’re not mounting any other local 
directories that could override the image’s code. If needed, try a fresh clone 
of the repo at the 6.0.0 tag.

Let me know if you want help checking your local directory or diagnosing 
further!


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/e2a0ebc6-dca5-419a-bc98-6f320c38487a?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/e2a0ebc6-dca5-419a-bc98-6f320c38487a?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/e2a0ebc6-dca5-419a-bc98-6f320c38487a?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/e2a0ebc6-dca5-419a-bc98-6f320c38487a?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/e2a0ebc6-dca5-419a-bc98-6f320c38487a?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/e2a0ebc6-dca5-419a-bc98-6f320c38487a?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/e2a0ebc6-dca5-419a-bc98-6f320c38487a?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Your%20error%20happens%20because%2C%20even%20though%20you%E2%80%99re%20on%20a%20detached%20HEAD%20at%206.0.0%2C%20your%20docker-compose%20setup%20mounts%20the%20local%20./docker%20directory%20into%20the%20container.%20If%20your%20local%20./docker%20directory%20is%20not%20exactly%20at%20the%206.0.0%20tag%20%28for%20example%2C%20if%20it%E2%80%99s%20from%20master%20or%20has%20uncommitted%20changes%29%2C%20it%20can%20override%20the%20migration%20scripts%20inside%20the%20Docker%20image%2C%20causing%20Alembic%20to%20fail%20to%20find%20the%20migration%20script%20for%20f5b5f88d8526%C2%A0%5Bdetails%5D%28https%3A//github.com/apache/superset/issues/32733%29.%0A%0ATo%20fix%20this%3A%0A%0A1.%20Make%20sure%20your%20local%20repo%20is%20at%20the%206.0.0%20tag%20and%2
 
0up%20to%20date%3A%0A%20%20%20%60%60%60bash%0A%20%20%20git%20fetch%20--tags%0A%20%20%20git%20checkout%206.0.0%0A%20%20%20%60%60%60%0A2.%20Remove%20all%20stopped%20containers%20and%20Docker%20volumes%20to%20clear%20any%20old%20state%3A%0A%20%20%20%60%60%60bash%0A%20%20%20docker%20compose%20-f%20docker-compose-image-tag.yaml%20down%20-v%0A%20%20%20%60%60%60%0A3.%20Start%20your%20containers%20again%3A%0A%20%20%20%60%60%60bash%0A%20%20%20docker%20compose%20-f%20docker-compose-image-tag.yaml%20up%0A%20%20%20%60%60%60%0A%0AThis%20ensures%20the%20migration%20scripts%20in%20./docker%20match%20the%20Docker%20image%20and%20your%20database%20state%2C%20so%20Alembic%20can%20find%20f5b5f88d8526%20and%20your%20container%20will%20start%20without%20migration%20errors%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/issues/34284%29.%0A%0AIf%20you%20still%20see%20the%20error%2C%20double-check%20that%20there%20are%20no%20uncommitted%20changes%20or%20extra%20files%20in%20./docker%2C%20and%20
 
that%20you%E2%80%99re%20not%20mounting%20any%20other%20local%20directories%20that%20could%20override%20the%20image%E2%80%99s%20code.%20If%20needed%2C%20try%20a%20fresh%20clone%20of%20the%20repo%20at%20the%206.0.0%20tag.%0A%0ALet%20me%20know%20if%20you%20want%20help%20checking%20your%20local%20directory%20or%20diagnosing%20further%21)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/37232)

GitHub link: 
https://github.com/apache/superset/discussions/37232#discussioncomment-15539640

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to