V2-4 : placements multi-device (report_bytes, tables 000015, copies UI)
This commit is contained in:
@@ -333,6 +333,23 @@ func TestMigrationsUpDown(t *testing.T) {
|
||||
t.Error("index unique partiel (id) WHERE revoked_at IS NULL manquant sur share_links")
|
||||
}
|
||||
|
||||
// --- 000014 : has_content + 000015 : placements -------------------------
|
||||
var hasContentCol int
|
||||
err = conn.QueryRow(`
|
||||
SELECT COUNT(*) FROM information_schema.columns
|
||||
WHERE table_schema = 'public' AND table_name = 'resources' AND column_name = 'has_content'`).Scan(&hasContentCol)
|
||||
if err != nil {
|
||||
t.Fatalf("has_content column: %v", err)
|
||||
}
|
||||
if hasContentCol == 0 {
|
||||
t.Error("colonne resources.has_content manquante après 000014")
|
||||
}
|
||||
|
||||
assertTables(t, conn, "users", "devices", "resources", "operations", "ocr_jobs", "shares", "share_links", "storage_locations", "resource_placements", "schema_migrations")
|
||||
|
||||
assertHexCheck(t, conn, "storage_locations", "id")
|
||||
assertHexCheck(t, conn, "storage_locations", "device_id")
|
||||
|
||||
if err := MigrateDownDatabase(url); err != nil {
|
||||
t.Fatalf("migrate down: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user