Write dbapi schema version to metadata table instead of a file
This commit is contained in:
parent
50091d1f86
commit
90495324e0
@ -599,6 +599,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
||||
# being new
|
||||
if not self.dbapi.table_exists("person"):
|
||||
self._create_schema()
|
||||
self._set_metadata('version', str(self.VERSION[0]))
|
||||
|
||||
# Load metadata
|
||||
self.name_formats = self._get_metadata('name_formats')
|
||||
|
@ -55,11 +55,6 @@ class DBAPI(DbGeneric):
|
||||
"""
|
||||
def write_version(self, directory):
|
||||
"""Write files for a newly created DB."""
|
||||
_LOG.debug("Write schema version file to %s", str(self.VERSION[0]))
|
||||
versionpath = os.path.join(directory, "schemaversion.txt")
|
||||
with open(versionpath, "w") as version_file:
|
||||
version_file.write(str(self.VERSION[0]))
|
||||
|
||||
versionpath = os.path.join(directory, str(DBBACKEND))
|
||||
_LOG.debug("Write database backend file")
|
||||
with open(versionpath, "w") as version_file:
|
||||
|
Loading…
Reference in New Issue
Block a user