mistercrunch opened a new pull request, #34679:
URL: https://github.com/apache/superset/pull/34679

   This fixes a startup issue where SeedSystemThemesCommand tried to access 
theme columns (is_system, is_system_default, is_system_dark) before database 
migrations were applied, causing initialization failures.
   
   The solution adds an Alembic-based migration check to ensure the database 
schema is up-to-date before running any database-dependent initialization.
   
   Changes:
   - Added _is_database_up_to_date() method that compares current DB revision 
with the head revision from migration files
   - Simplified _init_database_dependent_features() by removing redundant table 
existence checks and consolidating all DB-dependent features under the 
migration check
   - Removed unused sqlalchemy imports (inspect, OperationalError)
   
   This prevents startup failures when:
   1. The database hasn't been migrated yet
   2. New columns are added but migrations haven't run
   3. The app starts before 'superset db upgrade' is executed
   
   The fix ensures theme seeding and other DB-dependent features only run when 
the database schema is fully up-to-date.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to