1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
-
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
-
- class CreateProgramCriterion2 extends Migration
- {
-
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('program_criterion', function (Blueprint $table) {
- $table->increments('id');
- $table->timestamps();
- $table->integer('program_id')->nullable()->unsigned();
- $table->foreign('program_id')
- ->references('id')
- ->on('programs')
- ->onDelete('cascade')
- ->onUpdate('cascade');
- $table->integer('criterion_id')->unsigned();
- $table
- ->foreign('criterion_id')
- ->references('id')
- ->on('new_criteria')
- ->onDelete('cascade')
- ->onUpdate('cascade');
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('program_criterion');
- }
- }
|