AssetCopiesTable
tableBreakdex::DataStores::AssetCopiesTable
Tracks every copy of a video asset across cloud providers with sync status
Each row is one copy of a content-addressed asset on a specific provider. A single asset may have copies on local, iCloud, Google Drive, and S3 simultaneously. The status field tracks the upload lifecycle from pending through verified or failed.
Relationships
Depends On 1
asset_copies_dao
Reads From 2
asset_manifest_tablesync_providers_table
Breaks If 3
provider_enum_changesstatus_enum_changescontent_hash_fk_integrity
Data Access
Reads 2
asset_manifest_tablesync_providers_table
Answers
States
| State | Behavior |
|---|---|
| failed | message: Upload failed — error_message contains the reason, eligible for retry shows: error_indicator_with_message |
| no Remote Path | message: Copy is pending or uploading — remote_path assigned after successful upload shows: upload_not_started |
| verified | message: Copy verified on provider — remote_etag confirms integrity shows: cloud_checkmark |
Columns
| Name | Type | Constraints |
|---|---|---|
| id | text | NOT NULL |
| content_hash | text | NOT NULL |
| provider | text | NOT NULL ENUM: local, icloud, gdrive, s3 |
| remote_path | text | |
| remote_etag | text | |
| verified_at | datetime | |
| status | text | NOT NULL DEFAULT: pending ENUM: pending, uploading, verified, failed, deleted |
| upload_progress | real | |
| error_message | text | |
| created_at | datetime | NOT NULL DEFAULT: now |
| updated_at | datetime | NOT NULL DEFAULT: now |
Primary Key
idForeign Keys
content_hash \u2192 asset_manifestIndexes
idx_asset_copies_hash
(content_hash)