Skip to content
Prev Previous commit
Next Next commit
refactor: TT-404 revert changes _db.py
  • Loading branch information
Jobzi committed Nov 24, 2021
commit 09271e5f68d2b6526816e58ccab8a7aa19a23a14
4 changes: 0 additions & 4 deletions V2/time_tracker/_infrastructure/_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

from . import _config

_TEST_DIALECT = "sqlite"


class DB():
config = _config.load_config()
Expand All @@ -19,6 +17,4 @@ def get_session(self):
self.metadata.create_all(self.engine)
if self.connection is None:
self.connection = self.engine.connect()
if self.engine.dialect.name == _TEST_DIALECT:
self.connection.execute("pragma foreign_keys=ON")
return self.connection