| 1 | -- Native forks must snapshot their source's accounted bytes while new |
| 2 | -- writes are blocked. An interrupted copy retains its lock for explicit |
| 3 | -- reconciliation; expiring it blindly could admit an in-flight copy. |
| 4 | ALTER TABLE repos ADD COLUMN storage_reserved_bytes INTEGER NOT NULL DEFAULT 0; |
| 5 | CREATE TABLE storage_copy_locks ( |
| 6 | repo_id TEXT PRIMARY KEY, |
| 7 | destination_id TEXT NOT NULL, |
| 8 | created_at TEXT NOT NULL |
| 9 | ); |