1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
-
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
-
- class AddOutcomeIdToObjectivesTable extends Migration
- {
-
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- //Schema::table('objectives', function(Blueprint $table)
- //{
- // $table->integer('outcome_id')->unsigned();
-
- // $table->foreign('outcome_id')->references('id')->on('outcomes')->onDelete('cascade')->onUpdate('cascade');
- //});
- }
-
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::table('objectives', function (Blueprint $table) {
- $table->dropForeign('objectives_outcome_id_foreign');
-
- $table->dropColumn('outcome_id');
- });
- }
- }
|