2019_05_08_160636_create_positions_table.php 587 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. class CreatePositionsTable extends Migration {
  5. /**
  6. * Run the migrations.
  7. *
  8. * @return void
  9. */
  10. public function up()
  11. {
  12. Schema::create('positions', function(Blueprint $table)
  13. {
  14. $table->increments('id');
  15. $table->string('name', 191)->comment('位置名称');
  16. $table->boolean('sort')->default(0)->comment('排序');
  17. $table->timestamps();
  18. });
  19. }
  20. /**
  21. * Reverse the migrations.
  22. *
  23. * @return void
  24. */
  25. public function down()
  26. {
  27. Schema::drop('positions');
  28. }
  29. }