<?php namespace Concore\Foundation\Commands;

use DB;
use Illuminate\Database\Console\Migrations\MigrateCommand as ParentCommand;

class MigrateCommand extends ParentCommand {


    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function fire()
    {
        // Set storage engine in MySQL < 5.6
        try {
            DB::statement('SET storage_engine=InnoDB;');
        }
        catch(\Exception $e) {}
        
        // Set storage engine in MySQL > 5.6
        try {
            DB::statement('SET default_storage_engine=InnoDB;');
        }
        catch(\Exception $e) {}
        parent::fire();
    }

}
