added migration to normalize the system collection and field ids

This commit is contained in:
Gani Georgiev
2024-11-04 19:03:33 +02:00
parent b3d88349d7
commit 9e70c77736
9 changed files with 177 additions and 9 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ func (p *plugin) jsSnapshotTemplate(collections []*core.Collection) (string, err
const template = jsTypesDirective + `migrate((app) => {
const snapshot = %s;
return app.importCollections(snapshot, true);
return app.importCollections(snapshot, false);
}, (app) => {
return null;
})
@@ -348,7 +348,7 @@ func init() {
m.Register(func(app core.App) error {
jsonData := ` + "`%s`" + `
return app.ImportCollectionsByMarshaledJSON([]byte(jsonData), true)
return app.ImportCollectionsByMarshaledJSON([]byte(jsonData), false)
}, func(app core.App) error {
return nil
})