Skip to content
Snippets Groups Projects
Commit 99628aa9 authored by ale's avatar ale
Browse files

add missing indices, set correct table charset for MySQL

parent 348dc153
Branches
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ class MP3(Base):
"""
__tablename__ = 'mp3'
__table_args__ = {'mysql_charset': 'utf8'}
INCOMING = 'I'
READY = 'R'
......@@ -44,9 +45,9 @@ class MP3(Base):
state = Column(String(1), default=INCOMING, index=True)
path = Column(String(1024))
size = Column(Integer())
artist = Column(Unicode(256))
title = Column(Unicode(256))
album = Column(Unicode(256))
artist = Column(Unicode(256), index=True)
title = Column(Unicode(256), index=True)
album = Column(Unicode(256), index=True)
track_num = Column(Integer())
genre = Column(Unicode(64))
uploaded_at = Column(DateTime())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment