Без опису

2020_04_04_005817_add_outcome_id_to_objectives_table.php 724B

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