release 1.1.0 : sync V2 (upload, download, purge, placements, rétention, groupes)
Release / release-apk (push) Successful in 9m25s
Release / release-docker (push) Successful in 33s
CI / docker (push) Successful in 7s
CI / lint-backend (push) Successful in 1m29s
CI / lint-mobile (push) Failing after 7m46s
CI / test-backend (push) Successful in 1m30s
CI / test-mobile (push) Successful in 9m27s
CI / build-backend (push) Successful in 47s
Release / release-apk (push) Successful in 9m25s
Release / release-docker (push) Successful in 33s
CI / docker (push) Successful in 7s
CI / lint-backend (push) Successful in 1m29s
CI / lint-mobile (push) Failing after 7m46s
CI / test-backend (push) Successful in 1m30s
CI / test-mobile (push) Successful in 9m27s
CI / build-backend (push) Successful in 47s
This commit is contained in:
@@ -349,6 +349,25 @@ func TestMigrationsUpDown(t *testing.T) {
|
||||
|
||||
assertHexCheck(t, conn, "storage_locations", "id")
|
||||
assertHexCheck(t, conn, "storage_locations", "device_id")
|
||||
assertHexCheck(t, conn, "groups", "id")
|
||||
|
||||
// shares XOR : exactement une cible (user ou groupe).
|
||||
var xorCheck int
|
||||
err = conn.QueryRow(`
|
||||
SELECT COUNT(*) FROM pg_constraint c
|
||||
JOIN pg_class t ON t.oid = c.conrelid
|
||||
WHERE t.relname = 'shares'
|
||||
AND pg_get_constraintdef(c.oid) LIKE '%grantee_user_id%'
|
||||
AND pg_get_constraintdef(c.oid) LIKE '%grantee_group_id%'`).Scan(&xorCheck)
|
||||
if err != nil {
|
||||
t.Fatalf("shares xor check: %v", err)
|
||||
}
|
||||
if xorCheck == 0 {
|
||||
t.Error("CHECK XOR (grantee_user_id / grantee_group_id) manquant sur shares après 000016")
|
||||
}
|
||||
|
||||
// --- 000016 : groupes + cible groupe sur shares -------------------------
|
||||
assertTables(t, conn, "users", "devices", "resources", "operations", "ocr_jobs", "shares", "share_links", "storage_locations", "resource_placements", "groups", "group_members", "schema_migrations")
|
||||
|
||||
if err := MigrateDownDatabase(url); err != nil {
|
||||
t.Fatalf("migrate down: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user