PHP Method Schema::DropIfExists, someline-starter Code Examples

This page contains top rated real world PHP examples of method Schema::DropIfExists from package someline-starter extracted from open source projects. You can rate examples to help us improve the quality of examples
Example #1
Show file File: 2015_12_05_170008_create_table_horaires.php Project: HamzaElgarrab/Slackerz
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::DropIfExists('horaires');
     Schema::Create('horaires', function (Blueprint $table) {
         $table->engine = 'InnoDB';
         $table->increments('id');
         $table->date('date');
         $table->time('h_debut');
         $table->time('h_fin');
         $table->integer('matiere_id')->unsigned();
         $table->foreign('matiere_id')->references('id')->on('matieres')->onDelete('cascade');
         $table->timestamps();
     });
 }
Example #2
Show file File: 2015_12_05_170007_create_table_matieres.php Project: HamzaElgarrab/Slackerz
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::DropIfExists('matieres');
     Schema::Create('matieres', function (Blueprint $table) {
         $table->engine = 'InnoDB';
         $table->increments('id');
         $table->String('nom', 200);
         $table->integer('enseignant_id')->unsigned();
         $table->integer('promo_id')->unsigned();
         $table->integer('module_id')->unsigned();
         $table->foreign('enseignant_id')->references('id')->on('enseignants')->onDelete('cascade');
         $table->foreign('promo_id')->references('id')->on('promos')->onDelete('cascade');
         $table->foreign('module_id')->references('id')->on('modules')->onDelete('cascade');
         $table->timestamps();
     });
 }