-
Notifications
You must be signed in to change notification settings - Fork 238
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
Allow for table creation to be optional to allow for table/schema management by other tooling #239
base: development
Are you sure you want to change the base?
Allow for table creation to be optional to allow for table/schema management by other tooling #239
Conversation
e03e557
to
e77975e
Compare
b087de8
to
2d9ebc2
Compare
Thanks for the PR! @MauriceBrg has a similar PR for dynamo in #237. I'm thinking let's align the terminology with ...TABLE_EXISTS? And a similar addition to the docstring maybe |
…hema by other tooling (like Flask-Migrate)
2d9ebc2
to
beb9f34
Compare
@MauriceBrg Happy to align on terminology; I think I've folded in the requested updates? Let me know if there's anything else. |
Looks good to me in terms of naming, the DynamoDB version is For DynamoDB I added a bit more information about what the table needs to look like if you want to use an existing one. I'm not too familiar with SQL Alchemy so I don't know if it's worth adding something like that.
|
@MauriceBrg lol; just realized I tagged you in my response that was meant for @Lxstr 😅 I'm all for better docs, but I'm not sure it's necessary to document the model schema in the docstring since the model definition exists just a few lines north of the interface class itself ( @Lxstr I think this is ready to go? |
In previous versions of Flask-Session, table creation was intentionally removed to allow other tooling (e.g., Flask-Migrate) to manage table creation and schema updates, among other reasons.
It seems that in the shuffle of merging in changes from Flask-Session2, automatic table creation was re-added to Flask-Session, thus breaking application init and migrations for folks who manage their own tables and schemas.
This PR simply gates that behavior behind a configuration key to allow users to choose the behavior they prefer; the config key defaults to
True
to reflect the current state.