-
Notifications
You must be signed in to change notification settings - Fork 31
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
Use the flask-sqlalchemy metadata instead of creating a new one #22
Comments
@gouthambs Absolutely! |
@ashcrow Here is some background for this issue. While working on the flask-blogging extension, I have a |
@gouthambs Ah, I see. Are you looking at allowing metadata to be passed into the |
Actually the |
@gouthambs does this end up being: - meta = sql.MetaData()
+ if db:
+ meta = db.metadata
+ else:
+ meta = sql.MetaData() |
@ashcrow Thats correct. Another thing is I feel the tables should not be created by this storage class. Explicit invocation of This is consistent with how Flask-SQLAlchemy models just create the table instances in the |
@gouthambs I'll commit the above patch. Let's discuss explicit |
@ashcrow Sure! Sounds good! |
Work done in 23e0f8e. Closing this issue. |
I found a small issue with the way the MetaData is constructed in the
sql.py
. Would like to fix this if you are still taking pull requests!The text was updated successfully, but these errors were encountered: