Nenhuma descrição

2021_07_06_075356_criterion_scale.php 811B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. class CriterionScale extends Migration
  5. {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::create('criterion_scale', function (Blueprint $table) {
  14. $table->increments('id')->unsigned();
  15. $table->integer('criterion_id')->unsigned();
  16. $table->foreign('criterion_id')
  17. ->references('id')
  18. ->on('criteria')
  19. ->onUpdate('cascade')
  20. ->onDelete('cascade');
  21. $table->integer('scale_id')->unsigned();
  22. $table->foreign('scale_id')
  23. ->references('id')
  24. ->on('scales')
  25. ->onUpdate('cascade')
  26. ->onDelete('cascade');
  27. });
  28. }
  29. /**
  30. * Reverse the migrations.
  31. *
  32. * @return void
  33. */
  34. public function down()
  35. {
  36. Schema::drop('criterion_scale');
  37. }
  38. }