with sql_connect(self.path) as conn:
schema_rows = [r[0] for r in conn.execute(sql_for_schema) if r[0]]
retrieved_schema = ';\n'.join(schema_rows) + ';'
with open(PATH_DB_SCHEMA, 'r', encoding='utf-8') as f:
stored_schema = f.read().rstrip()
if stored_schema != retrieved_schema:
with sql_connect(self.path) as conn:
schema_rows = [r[0] for r in conn.execute(sql_for_schema) if r[0]]
retrieved_schema = ';\n'.join(schema_rows) + ';'
with open(PATH_DB_SCHEMA, 'r', encoding='utf-8') as f:
stored_schema = f.read().rstrip()
if stored_schema != retrieved_schema: