Add database migration for content_hash -> cid rename
- Add DO block to migrate existing columns: - cache_items.content_hash -> cid - item_types.content_hash -> cid - l2_shares.content_hash -> cid - storage_pins.content_hash -> cid - run_cache.output_hash -> output_cid - Fix duplicate key bug in upload response Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -221,8 +221,8 @@ async def upload_content(
|
||||
raise HTTPException(400, error)
|
||||
|
||||
return {
|
||||
"cid": ipfs_cid,
|
||||
"cid": cid, # Legacy, for backwards compatibility
|
||||
"cid": ipfs_cid or cid,
|
||||
"content_hash": cid, # Legacy, for backwards compatibility
|
||||
"filename": file.filename,
|
||||
"size": len(content),
|
||||
"uploaded": True,
|
||||
|
||||
Reference in New Issue
Block a user