2018_10_12_111321_create_oauths_table.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateOauthsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('oauths', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('name')->comment('名称');
  17. $table->string('alias')->unique()->comment('别名');
  18. $table->integer('order')->index()->comment('排序');
  19. $table->string('app_id')->comment('appid');
  20. $table->string('app_key')->comment('appkey');
  21. $table->integer('status')->index()->default('1')->comment('状态(1:开启 0 关闭)');
  22. $table->timestamps();
  23. $table->softDeletes();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('oauths');
  34. }
  35. }