updated automigrate templates, added js bindings tests and updated models IsNew behavior

This commit is contained in:
Gani Georgiev
2022-12-05 13:57:09 +02:00
parent 604009bd10
commit b8cd686b32
21 changed files with 546 additions and 213 deletions
+16
View File
@@ -136,3 +136,19 @@ func (p *plugin) getCachedCollections() (map[string]*models.Collection, error) {
return result, nil
}
func (p *plugin) hasCustomMigrations() bool {
files, err := os.ReadDir(p.options.Dir)
if err != nil {
return false
}
for _, f := range files {
if f.IsDir() {
continue
}
return true
}
return false
}