2017_10_18_203752_create_git_projects_table.php 891 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateGitProjectsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('git_projects', function (Blueprint $table) {
  15. $table->increments('id')->comment('项目主键');
  16. $table->tinyInteger('sort')->default(1)->comment('排序');
  17. $table->tinyInteger('type')->default(1)->comment('1:github 2:gitee');
  18. $table->string('name')->default('')->comment('项目名');
  19. $table->timestamps();
  20. $table->softDeletes();
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. *
  26. * @return void
  27. */
  28. public function down()
  29. {
  30. Schema::dropIfExists('git_projects');
  31. }
  32. }