Skip to content

Commit

Permalink
Remove SQLAlchemy keep_existing in favour of check_first
Browse files Browse the repository at this point in the history
  • Loading branch information
Lxstr committed Mar 1, 2024
1 parent f25d9d3 commit 20e5b41
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/flask_session/sqlalchemy/sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ class SqlAlchemySession(ServerSideSession):
def create_session_model(db, table_name, schema=None, bind_key=None, sequence=None):
class Session(db.Model):
__tablename__ = table_name
__table_args__ = (
{"schema": schema, "keep_existing": True}
if schema
else {"keep_existing": True}
)
__table_args__ = {"schema": schema} if schema else {}
__bind_key__ = bind_key

id = (
Expand Down

0 comments on commit 20e5b41

Please sign in to comment.