Rose-Models erzeugen: Auth-Objekt erst resetten, wenn Auth-Schema angelegt
[kivitendo-erp.git] / scripts / rose_auto_create_model.pl
index dc3d017..111b0c7 100755 (executable)
@@ -430,8 +430,6 @@ sub drop_and_create_test_database {
     $auth_dbh->disconnect;
 
     dbh_do($dbh_template, "DROP DATABASE \"" . $db_cfg->{db} . "\"", message => "Database could not be dropped");
-
-    $::auth->reset;
   }
 
   notice("Creating database");
@@ -466,6 +464,8 @@ sub drop_and_create_test_database {
 
   apply_upgrades(auth => 1, dbh => $dbh);
 
+  $::auth->reset;
+
   notice("Creating client, user, group and employee");
 
   dbh_do($dbh, qq|DELETE FROM auth.clients|);