fix(upload): 分片上传 - 先预留配额并原子提交容量 (#679)

Co-authored-by: ddcat666 <26564566+ddcat666@users.noreply.github.com>
This commit is contained in:
Catlaxy AI
2026-10-06 09:42:48 +08:00
committed by GitHub
parent 398f8e36f5
commit 2cc53fa25c
16 changed files with 661 additions and 36 deletions

View File

@@ -36,6 +36,9 @@ func TestMigrateSchemaRecordsAndValidatesVersion(t *testing.T) {
if !status.Ready || status.Current != CurrentSchemaVersion {
t.Fatalf("unexpected schema status: %#v", status)
}
if !db.Migrator().HasTable(&model.UploadReservation{}) {
t.Fatal("upload reservation migration missing")
}
if !db.Migrator().HasIndex(&schemaMigration{}, "idx_schema_migrations_applied_at") {
t.Fatal("schema migration v2 did not create the applied_at index")
}