2016_10_31_032221_create_player_table.php 865 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreatePlayerTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. //
  15. Schema::create('players', function(Blueprint $table){
  16. $table->increments('id')->comment('选手id');
  17. $table->integer('group_id')->unsigned()->comment('分组id');
  18. $table->string('name', 120)->comment('选手名称');
  19. $table->string('no', 120)->comment('选手编号');
  20. $table->string('image')->comment('选手头像或图片');
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. *
  26. * @return void
  27. */
  28. public function down()
  29. {
  30. //
  31. Schema::drop('players');
  32. }
  33. }