Skip to content

Commit

Permalink
Merge pull request #70 from pycasbin/revert-69-master
Browse files Browse the repository at this point in the history
Revert "feature: Adds the option to supress MetaData.create_all call"
  • Loading branch information
leeqvip authored Jul 5, 2024
2 parents 89735d6 + 3ba7e00 commit 0e29b6f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions casbin_sqlalchemy_adapter/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Filter:
class Adapter(persist.Adapter, persist.adapters.UpdateAdapter):
"""the interface for Casbin adapters."""

def __init__(self, engine, db_class=None, filtered=False, create_all_models=True):
def __init__(self, engine, db_class=None, filtered=False):
if isinstance(engine, str):
self._engine = create_engine(engine)
else:
Expand All @@ -82,8 +82,7 @@ def __init__(self, engine, db_class=None, filtered=False, create_all_models=True
self._db_class = db_class
self.session_local = sessionmaker(bind=self._engine)

if create_all_models:
Base.metadata.create_all(self._engine)
Base.metadata.create_all(self._engine)
self._filtered = filtered

@contextmanager
Expand Down

0 comments on commit 0e29b6f

Please # to comment.