|
|
@@ -260,10 +260,12 @@ class PostgresCollectionsHandler(Handler):
|
|
|
SET collection_ids = array_remove(collection_ids, $1)
|
|
|
WHERE $1 = ANY(collection_ids)
|
|
|
"""
|
|
|
+ logger.info(f"Deleting collection {collection_id} from users")
|
|
|
await self.connection_manager.execute_query(
|
|
|
user_update_query, [collection_id]
|
|
|
)
|
|
|
|
|
|
+ logger.info(f"Deleting collection1 {collection_id} from documents")
|
|
|
# Remove collection_id from documents
|
|
|
document_update_query = f"""
|
|
|
WITH updated AS (
|
|
|
@@ -277,7 +279,7 @@ class PostgresCollectionsHandler(Handler):
|
|
|
await self.connection_manager.fetchrow_query(
|
|
|
document_update_query, [collection_id]
|
|
|
)
|
|
|
-
|
|
|
+ logger.info(f"Deleting collection2 {collection_id} from documents")
|
|
|
# Delete the collection
|
|
|
delete_query = f"""
|
|
|
DELETE FROM {self._get_table_name(PostgresCollectionsHandler.TABLE_NAME)}
|