暫無描述

2020_11_11_201214_dropForeignObjOut.php 598B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. class DropForeignObjOut extends Migration
  5. {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::table('criterion_objective_outcome', function (Blueprint $table) {
  14. $table->dropForeign('criterion_objective_outcome_objective_outcome_id_foreign');
  15. $table->foreign('outcome_id')->references('id')->on('outcomes')->onDelete('cascade')->onUpdate('cascade');
  16. });
  17. }
  18. /**
  19. * Reverse the migrations.
  20. *
  21. * @return void
  22. */
  23. public function down()
  24. {
  25. //
  26. }
  27. }