Brak opisu

2021_06_01_000638_create_semesters_table.php 651B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. class CreateSemestersTable extends Migration
  5. {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::create('semesters', function (Blueprint $table) {
  14. $table->increments('id');
  15. $table->string('name', 25)->default('');
  16. $table->char('code', 3);
  17. $table->timestamp('start')->nullable();
  18. $table->timestamp('end')->nullable();
  19. $table->boolean('is_visible')->default(false);
  20. });
  21. }
  22. /**
  23. * Reverse the migrations.
  24. *
  25. * @return void
  26. */
  27. public function down()
  28. {
  29. Schema::drop('semesters');
  30. }
  31. }