No Description

2020_10_09_085334_add_activities_rubric_id.php 624B

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