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