[#6281] fixed unique validator error

This commit is contained in:
Gani Georgiev
2025-01-12 11:35:00 +02:00
parent 7175992ce4
commit 8b89bce2a8
3 changed files with 14 additions and 4 deletions

View File

@@ -92,6 +92,13 @@ func TestNormalizeUniqueIndexError(t *testing.T) {
[]string{"a", "b", "c"},
[]string{"a", "b"},
},
{
"unique index error with matching table name and field starting with the name of another non-unique field",
errors.New("UNIQUE constraint failed for fields test.a_2,test.c"),
"test",
[]string{"a", "a_2", "c"},
[]string{"a_2", "c"},
},
}
for _, s := range scenarios {