Ejemplo n.º 1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Eloquent::unguard();
     /*Desativa chave etrangeira*/
     DB::statement('SET FOREIGN_KEY_CHECKS=0;');
     \CodeProject\Entities\ProjectTask::truncate();
     \CodeProject\Entities\ProjectMember::truncate();
     \CodeProject\Entities\ProjectNote::truncate();
     \CodeProject\Entities\Project::truncate();
     \CodeProject\Entities\Client::truncate();
     \CodeProject\Entities\User::truncate();
     $this->call(UserTableSeeder::class);
     $this->call(ClientTableSeeder::class);
     $this->call(ProjectTableSeeder::class);
     $this->call(ProjectNoteTableSeeder::class);
     $this->call(ProjectMembersTableSeeder::class);
     $this->call(ProjectTasksTableSeeder::class);
     /*ativa chave estrangeira*/
     DB::statement('SET FOREIGN_KEY_CHECKS=1;');
 }
Ejemplo n.º 2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     DB::statement('SET FOREIGN_KEY_CHECKS=0;');
     Project::truncate();
     User::truncate();
     Client::truncate();
     ProjectNote::truncate();
     ProjectTask::truncate();
     ProjectMember::truncate();
     OauthClient::truncate();
     DB::statement('SET FOREIGN_KEY_CHECKS=1;');
     $this->call(ClientTableSeeder::class);
     $this->call(UserTableSeeder::class);
     $this->call(ProjectTableSeeder::class);
     $this->call(ProjectNoteTableSeeder::class);
     $this->call(ProjectTaskTableSeeder::class);
     $this->call(ProjectMemberTableSeeder::class);
     $this->call(OauthClientSeeder::class);
     Model::reguard();
 }
Ejemplo n.º 3
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     DB::statement('SET foreign_key_checks = 0');
     ProjectNote::truncate();
     ProjectTask::truncate();
     ProjectMember::truncate();
     ProjectFile::truncate();
     Project::truncate();
     Client::truncate();
     User::truncate();
     OAuthClient::truncate();
     DB::statement('SET foreign_key_checks = 1');
     $this->call(UserTableSeeder::class);
     $this->call(ClientTableSeeder::class);
     $this->call(ProjectTableSeeder::class);
     $this->call(ProjectNoteTableSeeder::class);
     $this->call(ProjectMemberTableSeeder::class);
     $this->call(ProjectTaskTableSeeder::class);
     $this->call(OAuthClientTableSeeder::class);
     Model::reguard();
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Project::truncate();
     factory(Project::class, 10)->create();
 }
Ejemplo n.º 5
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::statement("SET foreign_key_checks = 0");
     \CodeProject\Entities\Project::truncate();
     factory(\CodeProject\Entities\Project::class, 10)->create();
 }
Ejemplo n.º 6
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     \CodeProject\Entities\Project::truncate();
     factory(\CodeProject\Entities\Project::class, 5)->create();
 }