models: Fix build of custom table defs

- missing .items() call for "for" with dict
- missing db session on setup
master
Felix Stupp 2 years ago
parent bbaa79f20a
commit c7b63dfedb
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -1221,7 +1221,7 @@ CUSTOM_TABLE_DEFINITIONS: Mapping[SafeStr, str] = {
ALTER TABLE
`{MEDIAELEMENT_BLOCKING_LOOKUP_CACHE_TABLE}` ADD INDEX(`collection`);
""",
}
}.items()
}
@ -1232,6 +1232,7 @@ def table_exists(table_name: SafeStr) -> bool:
)
@orm.db_session
def setup_custom_tables():
"""
Creates & fills custom tables (especially cache tables) if they do not exist.

Loading…
Cancel
Save