mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 02:57:33 -05:00 
			
		
		
		
	Prevent setup from overwriting exisitng database
This commit is contained in:
		
							parent
							
								
									26e6495037
								
							
						
					
					
						commit
						bf47219ed6
					
				@ -122,6 +122,10 @@ class AppController extends BaseController
 | 
			
		||||
        fwrite($fp, $config);
 | 
			
		||||
        fclose($fp);
 | 
			
		||||
 | 
			
		||||
        if (Utils::isDatabaseSetup()) {
 | 
			
		||||
            return Redirect::to('/login');
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // == DB Migrate & Seed == //
 | 
			
		||||
        $sqlFile = base_path() . '/database/setup.sql';
 | 
			
		||||
        DB::unprepared(file_get_contents($sqlFile));
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user