fix: Bump FAB to 5.X (#33055)

Co-authored-by: Joe Li <joe@preset.io>
This commit is contained in:
Daniel Vaz Gaspar
2025-09-12 09:21:37 +01:00
committed by GitHub
parent dea9068647
commit a9fb853e3e
27 changed files with 100 additions and 327 deletions

View File

@@ -22,7 +22,7 @@ from alembic import context
from alembic.operations.ops import MigrationScript
from alembic.runtime.migration import MigrationContext
from flask import current_app
from flask_appbuilder import Base
from flask_appbuilder import Model
from sqlalchemy import engine_from_config, pool
# this is the Alembic Config object, which provides
@@ -45,7 +45,7 @@ if "sqlite" in DATABASE_URI:
# Escape % chars in the database URI to avoid interpolation errors in ConfigParser
escaped_uri = DATABASE_URI.replace("%", "%%")
config.set_main_option("sqlalchemy.url", escaped_uri)
target_metadata = Base.metadata # pylint: disable=no-member
target_metadata = Model.metadata # pylint: disable=no-member
# other values from the config, defined by the needs of env.py,