Merge branch 'sqlalchemy-warnings' into 'master'

Listen to SQLAlchemy's warnings

See merge request openlp/openlp!407
This commit is contained in:
Raoul Snyman 2022-02-04 22:06:24 +00:00
commit bdce45cb74
2 changed files with 2 additions and 3 deletions

View File

@ -288,6 +288,7 @@ class PathType(types.TypeDecorator):
representation and store it as a Unicode type
"""
impl = types.Unicode
cache_ok = True
def coerce_compared_value(self, op, value):
"""

View File

@ -388,9 +388,7 @@ def init_schema(url):
try:
class_mapper(Book)
except UnmappedClassError:
mapper(Book, song_books_table, properties={
'songs': relation(Song, secondary=songs_songbooks_table)
})
mapper(Book, song_books_table)
try:
class_mapper(MediaFile)
except UnmappedClassError: