2020_08_21_145711_create_level_table.php 591 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateLevelTable extends Migration {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up() {
  12. Schema::create('level', function(Blueprint $table) {
  13. $table->increments('id');
  14. $table->unsignedTinyInteger('level')->comment('等级');
  15. $table->string('name', 100)->comment('等级名称');
  16. });
  17. }
  18. /**
  19. * Reverse the migrations.
  20. *
  21. * @return void
  22. */
  23. public function down() {
  24. Schema::dropIfExists('level');
  25. }
  26. }