1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-24 15:14:30 +02:00

added support for specifying collection id with the factory and added collections indexes validator to prevent duplicated definitions

This commit is contained in:
Gani Georgiev
2024-11-03 10:44:48 +02:00
parent c3557d4e94
commit 106ce0f0c4
7 changed files with 119 additions and 67 deletions

View File

@@ -800,7 +800,7 @@ func TestCollectionCreate(t *testing.T) {
if err != nil {
t.Fatal(err)
}
demo1.AddIndex("exist_test", false, "created", "")
demo1.AddIndex("exist_test", false, "updated", "")
if err = app.Save(demo1); err != nil {
t.Fatal(err)
}
@@ -1268,7 +1268,7 @@ func TestCollectionUpdate(t *testing.T) {
if err != nil {
t.Fatal(err)
}
demo1.AddIndex("exist_test", false, "created", "")
demo1.AddIndex("exist_test", false, "updated", "")
if err = app.Save(demo1); err != nil {
t.Fatal(err)
}