Skip to content

Commit 90aae5f

Browse files
committed
make tests pass
1 parent 16cf3a5 commit 90aae5f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

backend/alembic/versions/c9e2cd766c29_add_s3_file_store_table.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,13 @@ def _migrate_files_to_external_storage() -> None:
232232
files_to_migrate = [row[0] for row in result.fetchall()]
233233
total_files = len(files_to_migrate)
234234

235-
external_store.initialize()
236-
237235
if total_files == 0:
238236
print("No files found in PostgreSQL storage to migrate.")
239237
return
240238

239+
# might need to move this above the if statement when creating a new multi-tenant
240+
# system. VERY extreme edge case.
241+
external_store.initialize()
241242
print(f"Found {total_files} files to migrate from PostgreSQL to external storage.")
242243

243244
_set_tenant_contextvar(session)

0 commit comments

Comments
 (0)