naotama (Naoki KOBAYASHI) 2025-03-17 14:48:19 +09:00 committed by crazywoola
parent 6b7b4bdfcd
commit b2fb321af8
2 changed files with 2 additions and 3 deletions

View File

@ -161,8 +161,7 @@ def migrate_annotation_vector_database():
try: try:
# get apps info # get apps info
apps = ( apps = (
db.session.query(App) App.query.filter(App.status == "normal")
.filter(App.status == "normal")
.order_by(App.created_at.desc()) .order_by(App.created_at.desc())
.paginate(page=page, per_page=50) .paginate(page=page, per_page=50)
) )

View File

@ -74,7 +74,7 @@ class IconType(Enum):
EMOJI = "emoji" EMOJI = "emoji"
class App(Base): class App(db.Model): # type: ignore[name-defined]
__tablename__ = "apps" __tablename__ = "apps"
__table_args__ = (db.PrimaryKeyConstraint("id", name="app_pkey"), db.Index("app_tenant_id_idx", "tenant_id")) __table_args__ = (db.PrimaryKeyConstraint("id", name="app_pkey"), db.Index("app_tenant_id_idx", "tenant_id"))