Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The superset db upgrade,the script not executed #31887

Open
3 tasks
worker24h opened this issue Jan 16, 2025 · 1 comment
Open
3 tasks

The superset db upgrade,the script not executed #31887

worker24h opened this issue Jan 16, 2025 · 1 comment
Labels
change:backend Requires changing the backend data:databases Related to database configurations and connections

Comments

@worker24h
Copy link

Bug description

root@superset-588675d6f7-52vtb:/app#
root@superset-588675d6f7-52vtb:/app# superset db upgrade
2025-01-16 15:57:24,377:DEBUG:superset.utils.logging_configurator:logging was configured successfully
2025-01-16 15:57:24,381:DEBUG:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
/usr/local/lib/python3.10/site-packages/flask_limiter/extension.py:333: UserWarning: Using the in-memory storage for tracking rate limits as no storage was explicitly specified. This is not recommended for production use. See: https://flask-limiter.readthedocs.io#configuring-a-storage-backend for documentation about configuring the storage backend.
  warnings.warn(
2025-01-16 15:57:24,461:INFO:superset.utils.screenshots:No PIL installation found
2025-01-16 15:57:24,749:INFO:superset.utils.pdf:No PIL installation found
WARNI [alembic.env] SQLite Database support for metadata databases will         be removed in a future version of Superset.
INFO  [alembic.env] Starting the migration scripts.
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
INFO  [alembic.env] Migration scripts completed. Duration: 00:00:00
root@superset-588675d6f7-52vtb:/app#
  1. I used MYSQL to store metadata,not sqlite
  2. The upgrade command executed success, but the table hasn't changed

Screenshots/recordings

No response

Superset version

4.1.1

Python version

3.10

Node version

18 or greater

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@dosubot dosubot bot added change:backend Requires changing the backend data:databases Related to database configurations and connections labels Jan 16, 2025
Copy link

dosubot bot commented Jan 16, 2025

I found a similar unsolved discussion regarding the issue of multiple head revisions during the superset db upgrade command. You can view it here [1].

Regarding your issue, it seems like the migration scripts are not being applied to your MySQL database, even though the command executes successfully. Here are a few things you might want to check:

  1. Database Connection Configuration: Ensure that your SQLALCHEMY_DATABASE_URI in superset_config.py is correctly pointing to your MySQL database and not to an SQLite database. This configuration is crucial for directing the migrations to the correct database.

  2. Alembic Heads: Check if there are multiple heads in your Alembic migrations. You can do this by running alembic heads to see if there are any discrepancies. If there are multiple heads, you might need to resolve them by merging branches or specifying a specific head.

  3. Migration Scripts: Verify that the migration scripts are correctly set up to apply changes to your MySQL database. Sometimes, specific migrations might have conditions that only apply to certain database types.

  4. Logging: Increase the logging level to DEBUG in your alembic.ini file to get more detailed output, which might help identify where the process is failing.

If these steps do not resolve the issue, you might want to look into any specific migration scripts that could have issues with MySQL, as there was a known issue with migration scripts in Superset 4.1.1 related to MySQL 8.0 [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change:backend Requires changing the backend data:databases Related to database configurations and connections
Projects
None yet
Development

No branches or pull requests

1 participant