/**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     $builder = Schema::getFacadeRoot();
     (new \App\Model\SimpleDB())->downTable($builder);
     (new \App\Model\Eloquent())->downTable($builder);
     (new \App\Model\TaggableEloquent())->downTable($builder);
     (new \App\Model\TaggableDB())->downTable($builder);
 }
Ejemplo n.º 2
0
 /**
  * Get a default schema value, if any is available
  *
  * @return Builder|null A default schema value or Null if no default value is available
  */
 public function getDefaultSchema()
 {
     // By default, the schema facade depends upon a
     // database connection being available. Therefore,
     // we need to ensure that this is true, before
     // attempting to return the facade-root
     $manager = DB::getFacadeRoot();
     if (!is_null($manager) && !is_null($manager->connection())) {
         return Schema::getFacadeRoot();
     }
     return $manager;
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     $builder = Schema::getFacadeRoot();
     (new \App\Model\UserTable())->downTable($builder);
 }