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

@dosu

As discussed, I have two database dumps from versions *5.0.0* and *6.0.0*.
When I run
SELECT version_num FROM alembic_version;,
I see the following Alembic version IDs:

   -

   f5b5f88d8526
   -

   c233f5365c9e

I’m not sure which Alembic version corresponds to *5.0.0* and which one to
*6.0.0*. Could you please confirm the exact code version I should use so
that I can properly recover my data?


On Mon, Jan 19, 2026 at 3:48 PM dosubot[bot] ***@***.***>
wrote:

> Yes, if you share the exact Alembic migration ID from your backup (check
> the alembic_version table in your metadata DB), I can help you determine
> which Superset release/tag matches that migration state. Each Superset
> release expects the metadata DB to be at a specific Alembic revision—if
> your backup's revision matches an official migration head, you can check
> out that Superset version, run superset db upgrade (or downgrade if
> needed), and your DB should work without migration errors (example
> <https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/migrations/versions/2025-01-08_09-34_d482d51c15ca_remove_legacy_plugins_5_0.py>,
> discussion <https://github.com/apache/superset/discussions/34579>).
>
> If your migration ID is from a dev or custom build (not present in the
> official release), direct restoration won’t work—Superset won’t recognize
> the migration chain. In that case, the safest workaround is to manually
> downgrade your DB to the last known good revision (e.g., superset db
> downgrade <revision>) that exists in the target release, then run superset
> db upgrade and superset init (details
> <https://github.com/apache/superset/discussions/34579>, issue
> <https://github.com/apache/superset/issues/33739>). Always back up your
> metadata DB before running these commands.
>
> If you want, paste the migration ID here and I’ll check which release/tag
> you need to run, or guide you through the downgrade/upgrade process. If the
> migration ID is missing from all official releases, you may need to
> manually edit the alembic_version table or use the export/import
> workaround.
>
> Let me know the migration ID and I’ll help you map it to the right
> Superset version or next steps!
>
> *To reply, just mention @dosu <https://go.dosu.dev/dosubot>.*
> ------------------------------
>
> How did I do? Good
> <https://app.dosu.dev/response-feedback/87f6d643-f874-401a-b7b5-cfd84206372f?feedback_type=great_response>
> | Irrelevant
> <https://app.dosu.dev/response-feedback/87f6d643-f874-401a-b7b5-cfd84206372f?feedback_type=irrelevant_answer>
> | Incorrect
> <https://app.dosu.dev/response-feedback/87f6d643-f874-401a-b7b5-cfd84206372f?feedback_type=incorrect_sources>
> | Verbose
> <https://app.dosu.dev/response-feedback/87f6d643-f874-401a-b7b5-cfd84206372f?feedback_type=too_verbose>
> | Hallucination
> <https://app.dosu.dev/response-feedback/87f6d643-f874-401a-b7b5-cfd84206372f?feedback_type=hallucination>
> | Report 🐛
> <https://app.dosu.dev/response-feedback/87f6d643-f874-401a-b7b5-cfd84206372f?feedback_type=bug_report>
> | Other
> <https://app.dosu.dev/response-feedback/87f6d643-f874-401a-b7b5-cfd84206372f?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=Yes%2C%20if%20you%20share%20the%20exact%20Alembic%20migration%20ID%20from%20your%20backup%20%28check%20the%20%60alembic_version%60%20table%20in%20your%20metadata%20DB%29%2C%20I%20can%20help%20you%20determine%20which%20Superset%20release/tag%20matches%20that%20migration%20state.%20Each%20Superset%20release%20expects%20the%20metadata%20DB%20to%20be%20at%20a%20specific%20Alembic%20revision%E2%80%94if%20your%20backup%27s%20revision%20matches%20an%20official%20migration%20head%2C%20you%20can%20check%20out%20that%20Superset%20version%2C%20run%20%60superset%20db%20upgrade%60%20%28or%20%60downgrade%60%20if%20needed%29%2C%20and%20your%20DB%20should%20work%20without%20migration%20errors%C2%A0%28%5Bexample%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/migrations/versions/2025-01-08_09-34_d482d51c15ca_remove_legacy_plugins_5_0.py%29%2C%20%5Bdiscussion%5D%28https%3A//github.com/apache/superset/discussions/34
 
579%29%29.%0A%0AIf%20your%20migration%20ID%20is%20from%20a%20dev%20or%20custom%20build%20%28not%20present%20in%20the%20official%20release%29%2C%20direct%20restoration%20won%E2%80%99t%20work%E2%80%94Superset%20won%E2%80%99t%20recognize%20the%20migration%20chain.%20In%20that%20case%2C%20the%20safest%20workaround%20is%20to%20manually%20downgrade%20your%20DB%20to%20the%20last%20known%20good%20revision%20%28e.g.%2C%20%60superset%20db%20downgrade%20%3Crevision%3E%60%29%20that%20exists%20in%20the%20target%20release%2C%20then%20run%20%60superset%20db%20upgrade%60%20and%20%60superset%20init%60%C2%A0%28%5Bdetails%5D%28https%3A//github.com/apache/superset/discussions/34579%29%2C%20%5Bissue%5D%28https%3A//github.com/apache/superset/issues/33739%29%29.%20Always%20back%20up%20your%20metadata%20DB%20before%20running%20these%20commands.%0A%0AIf%20you%20want%2C%20paste%20the%20migration%20ID%20here%20and%20I%E2%80%99ll%20check%20which%20release/tag%20you%20need%20to%20run%2C%20or%20guide%20you%20thr
 
ough%20the%20downgrade/upgrade%20process.%20If%20the%20migration%20ID%20is%20missing%20from%20all%20official%20releases%2C%20you%20may%20need%20to%20manually%20edit%20the%20%60alembic_version%60%20table%20or%20use%20the%20export/import%20workaround.%0A%0ALet%20me%20know%20the%20migration%20ID%20and%20I%E2%80%99ll%20help%20you%20map%20it%20to%20the%20right%20Superset%20version%20or%20next%20steps%21>
>  [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-15537531>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AUUYY64BTPY4BMVG3IMTYGD4HSY7NAVCNFSM6AAAAACSC7CE6SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKNJTG42TGMI>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>


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

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