index filepaths

This commit is contained in:
cwilvx
2024-07-05 05:33:01 +03:00
parent 09d67c8660
commit 104ef4c346
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ class TrackTable(Base):
date: Mapped[int] = mapped_column(Integer(), nullable=True) date: Mapped[int] = mapped_column(Integer(), nullable=True)
disc: Mapped[int] = mapped_column(Integer()) disc: Mapped[int] = mapped_column(Integer())
duration: Mapped[int] = mapped_column(Integer()) duration: Mapped[int] = mapped_column(Integer())
filepath: Mapped[str] = mapped_column(String(), unique=True) filepath: Mapped[str] = mapped_column(String(), index=True, unique=True)
folder: Mapped[str] = mapped_column(String(), index=True) folder: Mapped[str] = mapped_column(String(), index=True)
genrehashes: Mapped[list[str]] = mapped_column(JSON(), index=True) genrehashes: Mapped[list[str]] = mapped_column(JSON(), index=True)
genres: Mapped[Optional[list[dict[str, str]]]] = mapped_column(JSON()) genres: Mapped[Optional[list[dict[str, str]]]] = mapped_column(JSON())
-1
View File
@@ -5,7 +5,6 @@ Applies migrations.
from sqlalchemy import create_engine from sqlalchemy import create_engine
from app.db.userdata import UserTable from app.db.userdata import UserTable
from app.db.sqlite import create_connection, create_tables, queries
from app.db.sqlite.auth import SQLiteAuthMethods as authdb from app.db.sqlite.auth import SQLiteAuthMethods as authdb
from app.migrations import apply_migrations from app.migrations import apply_migrations
from app.settings import Db from app.settings import Db