mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 07:05:36 +01:00
Optimize search queries
This commit is contained in:
@@ -79,7 +79,7 @@ class Sequence(ormar.Model):
|
||||
source: Source = ormar.ForeignKey(Source, nullable=False)
|
||||
remote_id: int = ormar.Integer(minimum=0, nullable=False) # type: ignore
|
||||
|
||||
name: str = ormar.String(max_length=256, nullable=False) # type: ignore
|
||||
name: str = ormar.String(max_length=256, nullable=False, index=True) # type: ignore
|
||||
|
||||
|
||||
class BookAuthors(ormar.Model):
|
||||
@@ -129,7 +129,7 @@ class Book(ormar.Model):
|
||||
source: Source = ormar.ForeignKey(Source, nullable=False)
|
||||
remote_id: int = ormar.Integer(minimum=0, nullable=False) # type: ignore
|
||||
|
||||
title: str = ormar.String(max_length=256, nullable=False) # type: ignore
|
||||
title: str = ormar.String(max_length=256, nullable=False, index=True) # type: ignore
|
||||
lang: str = ormar.String(max_length=3, nullable=False) # type: ignore
|
||||
file_type: str = ormar.String(max_length=4, nullable=False) # type: ignore
|
||||
uploaded: date = ormar.Date() # type: ignore
|
||||
|
||||
Reference in New Issue
Block a user