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

chore: support sqlalchemy 2.x and flask-sqlalchemy 3 (breaking) #2241

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

dpgaspar
Copy link
Owner

@dpgaspar dpgaspar commented May 16, 2024

Description

  • Added config option to not create FAB's tables FAB_CREATE_DB
  • Flask-SQLAlchemy singleton is now created by FAB, import from from flask_appbuilder.extensions import db. This means init now is simpler: appbuilder.init_app(app)
  • appbuilder.sm.get_session was renamed to appbuilder.sm.session
  • Doing queries now require an app_context (breaking from flask-sqlalchemy)
  • SQLAInterface will not swallow exceptions, and accepts an optional parameter to commit or not commit
  • appbuilder.get_app does not exist anymore, use current_app instead, you can still use appbuilder.app but it's deprecated

ADDITIONAL INFORMATION

  • Has associated issue:
  • Is CRUD MVC related.
  • Is Auth, RBAC security related.
  • Changes the security db schema.
  • Introduces new feature
  • Removes existing feature

@hasansezertasan
Copy link

Related: #2240

@ddorian
Copy link

ddorian commented May 21, 2024

Also related #2038 #2162 #2108 #1940

@dpgaspar dpgaspar marked this pull request as ready for review June 4, 2024 06:16
@dpgaspar dpgaspar changed the title chore: support sqlalchemy 2.x and flask-sqlalchemy 3 chore: support sqlalchemy 2.x and flask-sqlalchemy 3 (breaking) Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants