Mercurial > libervia-backend
diff sat/memory/memory.py @ 3582:71516731d0aa
core (memory/sqla): database migration using Alembic:
Alembic database migration tool, which is the recommended one for SQLAlchemy has been
integrated. When a database is created, it will be used to stamp to current (head)
revision, otherwise, DB will be checked to see if it needs to be updated, and upgrade will
be triggered if necessary.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 25 Jun 2021 17:55:23 +0200 |
parents | 888109774673 |
children | 001ea5f4a2f9 |
line wrap: on
line diff
--- a/sat/memory/memory.py Fri Jun 25 10:17:34 2021 +0200 +++ b/sat/memory/memory.py Fri Jun 25 17:55:23 2021 +0200 @@ -223,7 +223,7 @@ ) -class Memory(object): +class Memory: """This class manage all the persistent information""" def __init__(self, host): @@ -241,10 +241,7 @@ self._cache_path = Path(self.getConfig("", "local_dir"), C.CACHE_DIR) async def initialise(self): - database_file = os.path.expanduser( - os.path.join(self.getConfig("", "local_dir"), C.SAVEFILE_DATABASE) - ) - self.storage = Storage(database_file, self.host.version) + self.storage = Storage() await self.storage.initialise() PersistentDict.storage = self.storage self.params = Params(self.host, self.storage)