yjp il y a 1 an
Parent
commit
dd8924a97e
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      instance.go

+ 5 - 1
instance.go

@@ -41,7 +41,11 @@ func DestroyInstance(clientVersion string, databaseID string) error {
 	return nil
 }
 
-func AutoMigrate(items []client.AutoMigrateItem) error {
+func AutoMigrate(items ...client.AutoMigrateItem) error {
+	if items == nil || len(items) == 0 {
+		return nil
+	}
+
 	dpsClientMutex.Lock()
 	defer dpsClientMutex.Unlock()