Checks for InnoDB
This commit is contained in:
parent
a0631dae03
commit
70b7167d56
2 changed files with 9 additions and 0 deletions
|
|
@ -308,6 +308,14 @@ class AppController extends BaseController
|
|||
// We need to make sure all tables are InnoDB to prevent migration failures
|
||||
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');
|
||||
$sql = "SET sql_mode = 'ALLOW_INVALID_DATES';\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ return [
|
|||
'collation' => 'utf8_unicode_ci',
|
||||
'prefix' => '',
|
||||
'strict' => env('DB_STRICT', false),
|
||||
'engine' => 'InnoDB',
|
||||
],
|
||||
|
||||
'pgsql' => [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue