mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 02:57:33 -05:00 
			
		
		
		
	Checks for InnoDB
This commit is contained in:
		
							parent
							
								
									d06ea6c72e
								
							
						
					
					
						commit
						5986759fe0
					
				@ -308,6 +308,14 @@ class AppController extends BaseController
 | 
				
			|||||||
    // We need to make sure all tables are InnoDB to prevent migration failures
 | 
					    // We need to make sure all tables are InnoDB to prevent migration failures
 | 
				
			||||||
    public function checkInnoDB()
 | 
					    public function checkInnoDB()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        $result = DB::select("SELECT engine
 | 
				
			||||||
 | 
					                    FROM information_schema.TABLES
 | 
				
			||||||
 | 
					                    WHERE TABLE_NAME='clients' AND TABLE_SCHEMA='ninja'");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (count($result) && $result[0]->engine == 'InnoDB') {
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $tables = DB::select('SHOW TABLES');
 | 
					        $tables = DB::select('SHOW TABLES');
 | 
				
			||||||
        $sql = "SET sql_mode = 'ALLOW_INVALID_DATES';\n";
 | 
					        $sql = "SET sql_mode = 'ALLOW_INVALID_DATES';\n";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user