diff --git a/casbin_sqlalchemy_adapter/adapter.py b/casbin_sqlalchemy_adapter/adapter.py index 75c4579..62df9a5 100644 --- a/casbin_sqlalchemy_adapter/adapter.py +++ b/casbin_sqlalchemy_adapter/adapter.py @@ -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: @@ -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