Repository navigation
Why do the tables generated in the superset database differ depending on the db_type when using version 6.1.0?
#41354
Replies: 2 comments 4 replies
|
The table differences you're seeing are not caused by using different database types (PostgreSQL vs MySQL). They're caused by migration history differences — specifically, how far along the Alembic migration chain each database has been migrated. Your MySQL instance appears to be an older installation that still contains legacy tables that were dropped in 2023–2024 migrations:
Your PostgreSQL instance appears to be a fresh or fully-migrated installation that has the newer tables ( Even though Impact on daily use: If both databases report the same head revision and Superset starts without errors, it should function normally. The leftover legacy tables in MySQL are just orphaned — they aren't used by current code. The missing newer tables in MySQL would be a problem if they're actually missing (features like SSH tunnels, embedded dashboards, etc. wouldn't work). Regarding migrating from PostgreSQL to MySQL: There is no officially supported tool for this. The recommended approach would be:
I'd recommend verifying your MySQL installation by checking whether the newer tables actually exist — if they don't, you may need to troubleshoot your migration history. To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
|
The difference in table count (53 tables on PostgreSQL vs 60 tables on MySQL) is not caused by different database dialects. It is caused by migration history differences between a clean database initialization versus a database that ran through legacy migrations. Why MySQL has extra tablesThe extra tables present in your MySQL instance (
When Superset deprecates features, Alembic migrations deliberately avoid destructive Does this impact daily use?No, there is zero impact on daily operations. The active SQLAlchemy ORM models in Superset 6.1.0 strictly query the 53 core tables. The remaining legacy tables in MySQL are completely inert and ignored by the application. Recommended Method to Migrate Historical Data from PostgreSQL to MySQLDo not attempt raw SQL table dumps between PostgreSQL and MySQL because column data types (such as The cleanest and officially supported migration paths are:
superset export-dashboards -f dashboards.zip
superset export-datasources -f datasources.zipImport them into your target instance using
|

Uh oh!
There was an error while loading. Please reload this page.
Total number of data tables generated using external PostgreSQL data sources:
ab_group ab_group_role ab_permission ab_permission_view ab_permission_view_role ab_register_user ab_role ab_user ab_user_group ab_user_role ab_view_menu alembic_version annotation annotation_layer cache_keys css_templates dashboard_roles dashboard_slices dashboard_user dashboards database_user_oauth2_tokens dbs dynamic_plugin embedded_dashboards favstar key_value keyvalue logs query report_execution_log report_recipient report_schedule report_schedule_user rls_filter_roles rls_filter_tables row_level_security_filters saved_query slice_user slices sql_metrics sqlatable_user ssh_tunnels tab_state table_columns table_schema tables tag tagged_object task_subscribers tasks themes user_attribute user_favorite_tagThe total number of data tables generated using external MySQL data sources is:
ab_group ab_group_role ab_permission ab_permission_view ab_permission_view_role ab_register_user ab_role ab_user ab_user_group ab_user_role ab_view_menu access_request alembic_version alert_logs alert_owner alerts annotation annotation_layer cache_keys clusters columns css_templates dashboard_email_schedules dashboard_roles dashboard_slices dashboard_user dashboards datasources dbs druiddatasource_user dynamic_plugin favstar keyvalue logs metrics query report_execution_log report_recipient report_schedule report_schedule_user rls_filter_roles rls_filter_tables row_level_security_filters saved_query slice_email_schedules slice_user slices sql_metrics sql_observations sqlatable_user tab_state table_columns table_schema tables tag tagged_object url user_attributeUsing two different databases with different numbers and names of tables, will this have any impact on daily use?
I checked using
superset db headsandsuperset db current, and the results were consistent:heads: 4b2a8c9d3e1f (head)current: 4b2a8c9d3e1f (head)However, there is one significant difference:
Another question is that I need to migrate existing historical data from PostgreSQL to MySQL. Is there a quick way to
All reactions