暂无描述

2021_06_01_000628_create_schools_table.php 494B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. class CreateSchoolsTable extends Migration
  5. {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::create('schools', function (Blueprint $table) {
  14. $table->increments('id');
  15. $table->string('name', 50);
  16. $table->timestamps();
  17. });
  18. }
  19. /**
  20. * Reverse the migrations.
  21. *
  22. * @return void
  23. */
  24. public function down()
  25. {
  26. Schema::drop('schools');
  27. }
  28. }