change the order of update
This commit is contained in:
		@@ -604,6 +604,15 @@ class DatabasesController extends Controller
 | 
			
		||||
            $database->update($databasePayload);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if ($backupPayload && $backupConfig) {
 | 
			
		||||
            $backupConfig->update($backupPayload);
 | 
			
		||||
 | 
			
		||||
            if ($request->backup_now) {
 | 
			
		||||
                dd('test');
 | 
			
		||||
                DatabaseBackupJob::dispatch($backupConfig);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if ($backupPayload && ! $backupConfig) {
 | 
			
		||||
            if ($database->type() === 'standalone-postgresql') {
 | 
			
		||||
                $backupPayload['databases_to_backup'] = $database->postgres_db;
 | 
			
		||||
@@ -628,14 +637,6 @@ class DatabasesController extends Controller
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if ($backupPayload && $backupConfig) {
 | 
			
		||||
            $backupConfig->update($backupPayload);
 | 
			
		||||
 | 
			
		||||
            if ($request->backup_now) {
 | 
			
		||||
                DatabaseBackupJob::dispatch($backupConfig);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if ($whatToDoWithDatabaseProxy === 'start') {
 | 
			
		||||
            StartDatabaseProxy::dispatch($database);
 | 
			
		||||
        } elseif ($whatToDoWithDatabaseProxy === 'stop') {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user