GitHub user Hassan6945 added a comment to the discussion: apache super set db 
migration issue

@dosu
 before docker compose up i have checked data is in my database but when
container starts migration runs fine and after that there is no data.

and now alembic version is c233f5365c9e

On Mon, Jan 19, 2026 at 7:38 PM Hassan Akhtar ***@***.***>
wrote:

> this is my branch
>
> git branch
> * (HEAD detached at 6.0.0)
>   master
>
> i am facing this error
>
>
> superset_init   | Loaded your LOCAL configuration at
> [/app/docker/pythonpath_dev/superset_config.py]
> superset_init   | 2026-01-19
> 14:34:51,748:INFO:alembic.runtime.migration:Context impl PostgresqlImpl.
> superset_init   | 2026-01-19
> 14:34:51,748:INFO:alembic.runtime.migration:Will assume transactional DDL.
> superset_init   | 2026-01-19 14:34:51,953:INFO:superset.app:Pending
> database migrations: run 'superset db upgrade'
> superset_init   | INFO  [alembic.env] Starting the migration scripts.
> superset_init   | INFO  [alembic.runtime.migration] Context impl
> PostgresqlImpl.
> superset_init   | INFO  [alembic.runtime.migration] Will assume
> transactional DDL.
> superset_init   | ERROR [flask_migrate] Error: Can't locate revision
> identified by 'f5b5f88d8526'
> Container superset_init Error service "superset-init" didn't complete
> successfully: exit 1
> Container superset_init Error service "superset-init" didn't complete
> successfully: exit 1
> Container superset_init Error service "superset-init" didn't complete
> successfully: exit 1
>
> this is from my .env
>
> its pointed to
>
> DATABASE_DB=db_6_1
> DATABASE_HOST=db
>
>
> and when i go this db
>
> and run  SELECT version_num FROM alembic_version;
>
>
>
> it show  f5b5f88d8526
>
> dont know why it causing error.
>
>
>
>
> On Mon, Jan 19, 2026 at 7:01 PM dosubot[bot] ***@***.***>
> wrote:
>
>> 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:
>>
>> git fetch --tags
>> git checkout 6.0.0
>>
>> Then restart your containers:
>>
>> 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:
>>
>> 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.
>>
>> *To reply, just mention @dosu <https://go.dosu.dev/dosubot>.*
>> ------------------------------
>>
>> 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>
>>
>> [image: Chat with Dosu]
>> <https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github>
>>  [image: Open in Cursor]
>> <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%20checkout%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%20migratio
 
n%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.>
>>  [image: Join Discord] <https://go.dosu.dev/discord-bot> [image: Share
>> on X]
>> <https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/37232>
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <https://github.com/apache/superset/discussions/37232#discussioncomment-15539136>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AUUYY662ZHXYRGAFEEWEEEL4HTPSVAVCNFSM6AAAAACSC7CE6SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKNJTHEYTGNQ>
>> .
>> You are receiving this because you were mentioned.Message ID:
>> ***@***.***>
>>
>


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

----
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