Skip to content

Commit

Permalink
Create tables if they do not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
gunthercox committed Jun 10, 2017
1 parent 424e4a6 commit 6931b00
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions chatterbot/storage/sql_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ def __init__(self, **kwargs):
"read_only", False
)

create = self.kwargs.get("create", False)

if not self.read_only and create:
if not self.engine.dialect.has_table(self.engine, 'StatementTable'):
self.create()

self.Session = sessionmaker(bind=self.engine, expire_on_commit=True)
Expand Down

0 comments on commit 6931b00

Please sign in to comment.