@@ -102,7 +102,7 @@ def get_existing_object_id(db, *, host: str, bucket: str, key: str) -> int | Non
102102 return db .run_query (
103103 """
104104 SELECT id
105- FROM storage.object
105+ FROM storage.objects
106106 WHERE scheme = 's3'
107107 AND host = :host
108108 AND bucket = :bucket
@@ -123,7 +123,7 @@ def insert_storage_object(
123123) -> int :
124124 db .run_sql (
125125 """
126- INSERT INTO storage.object
126+ INSERT INTO storage.objects
127127 (scheme, host, bucket, key, source, sha256_hash, mime_type)
128128 VALUES
129129 ('s3', :host, :bucket, :key, :source, :sha256, :mime_type)
@@ -139,7 +139,7 @@ def insert_storage_object(
139139 )
140140 object_id = get_existing_object_id (db , host = host , bucket = bucket , key = key )
141141 if object_id is None :
142- raise RuntimeError ("Failed to retrieve storage.object id after insert" )
142+ raise RuntimeError ("Failed to retrieve storage.objects id after insert" )
143143 return object_id
144144
145145
@@ -187,7 +187,7 @@ def staging_upload_dir(
187187 ingest_process_id : int ,
188188) -> dict :
189189 """
190- Upload local files to S3 via MinIO and register them in storage.object .
190+ Upload local files to S3 via MinIO and register them in storage.objects .
191191 Always uploads a single zip archive for the provided data_path.
192192 """
193193 if ingest_process_id is None :
@@ -278,7 +278,7 @@ def get_objects_for_slug(db, *, host: str, bucket: str, slug: str) -> list[dict]
278278 db .run_query (
279279 """
280280 SELECT id, key
281- FROM storage.object
281+ FROM storage.objects
282282 WHERE scheme = 's3'
283283 AND host = :host
284284 AND bucket = :bucket
@@ -309,7 +309,7 @@ def unlink_object_from_ingests(db, *, object_id: int) -> None:
309309def delete_storage_object (db , * , object_id : int ) -> None :
310310 db .run_sql (
311311 """
312- DELETE FROM storage.object
312+ DELETE FROM storage.objects
313313 WHERE id = :id
314314 """ ,
315315 dict (id = object_id ),
@@ -409,7 +409,7 @@ def staging_list_dir(
409409 db .run_query (
410410 """
411411 SELECT id, key
412- FROM storage.object
412+ FROM storage.objects
413413 WHERE scheme = 's3'
414414 AND host = :host
415415 AND bucket = :bucket
@@ -460,7 +460,7 @@ def staging_download_dir(db, slug: str, dest_path: Path) -> dict:
460460 db .run_query (
461461 """
462462 SELECT id, key
463- FROM storage.object
463+ FROM storage.objects
464464 WHERE scheme = 's3'
465465 AND host = :host
466466 AND bucket = :bucket
0 commit comments