protected function createMigration()
    {
        // migrations目录应该是根目录 app->path => base_pash
      $migration_file = base_path()."/database/migrations/".date('Y_m_d_His')."_workflow_setup_tables.php";
      $app = app();
      $resource_type = '';
      if(is_array($app['config']->get('resource_type'))){
        $resource_type = implode(",", app()['config']->get('workflow::resource_type'));
      }

      $output = $app['view']->make('workflow::generators.migration')->with('res_type',$resource_type)->render();

      if( ! file_exists( $migration_file ) )
      {
        $fs = fopen($migration_file, 'x');
        if ( $fs )
        {
          fwrite($fs, $output);
          fclose($fs);
          return true;
        }
        else
        {
          return false;
        }
      }
      else
      {
        return false;
      }
    }