GitHub user dosubot[bot] added a comment to the discussion: apache super set db migration issue
<!-- Answer --> The error happens because your local code is on the master branch, but your Docker image is Superset 6.0.0. When you run docker-compose-image-tag.yaml, it mounts your local ./docker directory into the container, which overrides the migration scripts inside the image. The master branch no longer includes the migration script for f5b5f88d8526, so Alembic can't find it and fails with this error [details](https://github.com/apache/superset/issues/31510). To fix this, check out the 6.0.0 tag locally before running docker-compose: ```bash git fetch --tags git checkout 6.0.0 ``` Then restart your containers: ```bash docker compose -f docker-compose-image-tag.yaml up ``` This ensures your migration scripts match the Docker image and your database state. If you still see errors, stop all containers and remove Docker volumes with: ```bash docker compose -f docker-compose-image-tag.yaml down -v ``` Then start up again. This will resolve the migration script mismatch and let Alembic find f5b5f88d8526 as expected [reference](https://github.com/apache/superset/issues/34284). Always make sure your local code and Docker image tags are aligned when using volume mounts. <!-- 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/9e7328be-f2c6-40f4-91f9-3bfe32ff6ff0?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/9e7328be-f2c6-40f4-91f9-3bfe32ff6ff0?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/9e7328be-f2c6-40f4-91f9-3bfe32ff6ff0?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/9e7328be-f2c6-40f4-91f9-3bfe32ff6ff0?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9e7328be-f2c6-40f4-91f9-3bfe32ff6ff0?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/9e7328be-f2c6-40f4-91f9-3bfe32ff6ff0?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9e7328be-f2c6-40f4-91f9-3bfe32ff6ff0?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=The%20error%20happens%20because%20your%20local%20code%20is%20on%20the%20master%20branch%2C%20but%20your%20Docker%20image%20is%20Superset%206.0.0.%20When%20you%20run%20docker-compose-image-tag.yaml%2C%20it%20mounts%20your%20local%20./docker%20directory%20into%20the%20container%2C%20which%20overrides%20the%20migration%20scripts%20inside%20the%20image.%20The%20master%20branch%20no%20longer%20includes%20the%20migration%20script%20for%20f5b5f88d8526%2C%20so%20Alembic%20can%27t%20find%20it%20and%20fails%20with%20this%20error%C2%A0%5Bdetails%5D%28https%3A//github.com/apache/superset/issues/31510%29.%0A%0ATo%20fix%20this%2C%20check%20out%20the%206.0.0%20tag%20locally%20before%20running%20docker-compose%3A%0A%0A%60%60%60bash%0Agit%20fetch%20--tags%0Agit%20chec kout%206.0.0%0A%60%60%60%0A%0AThen%20restart%20your%20containers%3A%0A%0A%60%60%60bash%0Adocker%20compose%20-f%20docker-compose-image-tag.yaml%20up%0A%60%60%60%0A%0AThis%20ensures%20your%20migration%20scripts%20match%20the%20Docker%20image%20and%20your%20database%20state.%20If%20you%20still%20see%20errors%2C%20stop%20all%20containers%20and%20remove%20Docker%20volumes%20with%3A%0A%0A%60%60%60bash%0Adocker%20compose%20-f%20docker-compose-image-tag.yaml%20down%20-v%0A%60%60%60%0A%0AThen%20start%20up%20again.%20This%20will%20resolve%20the%20migration%20script%20mismatch%20and%20let%20Alembic%20find%20f5b5f88d8526%20as%20expected%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/issues/34284%29.%0A%0AAlways%20make%20sure%20your%20local%20code%20and%20Docker%20image%20tags%20are%20aligned%20when%20using%20volume%20mounts.) [](https://go.dosu.dev/discord-bot) [](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-15539136 ---- 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]
