説明なし

2020_12_10_223135_addMinMaxInScales.php 602B

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