-
-
Notifications
You must be signed in to change notification settings - Fork 901
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
Disable SQLALCHEMY_DATABASE_URI when SQLALCHEMY_BINDS is used #663
Comments
I do believe we should remove the default value for Bumping this milestone to 3.0 since it would be a backwards incompatible change. |
Hi, I'd like to take on this issue :) |
Merged #727, go ahead with a PR! |
This comment has been minimized.
This comment has been minimized.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I don't see there is a need for
SQLALCHEMY_DATABASE_URI
whenSQLALCHEMY_BINDS
is used. If users don't setSQLALCHEMY_DATABASE_URI
then it gets a default value of an in-memory sqlite database. This may confuse users if they forget to set__bind_key__
on a model. In that case, that model doesn't fail but writes into the in-memory database.I was trying to set
SQLALCHEMY_DATABASE_URI
toNone
, but flask-sqlalchemy doesn't seem to allow that withdb.create_all()
, even if all the models have__bind_key__
set to a valid bind. Can you fix the plugin so thatSQLALCHEMY_DATABASE_URI
defaults toNone
, or at least let users set it toNone
? Thank you.Possibly related to: #471, #472
The text was updated successfully, but these errors were encountered: