2017_05_30_203521_create_admin_roles_table.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. /**
  6. * Migration auto-generated by Sequel Pro Laravel Export
  7. * @see https://github.com/cviebrock/sequel-pro-laravel-export
  8. */
  9. class CreateAdminRolesTable extends Migration
  10. {
  11. /**
  12. * Run the migrations.
  13. *
  14. * @return void
  15. */
  16. public function up()
  17. {
  18. Schema::create('admin_roles', function (Blueprint $table) {
  19. $table->increments('id');
  20. $table->string('name', 200)->comment('角色名称')->nullable();
  21. $table->integer('status')->default(1)->comment('是否禁用')->nullable();
  22. $table->string('info', 200)->comment('备注')->nullable();
  23. $table->timestamps();
  24. $table->softDeletes();
  25. $table->index('deleted_at', 'idx_deleted_at');
  26. });
  27. }
  28. /**
  29. * Reverse the migrations.
  30. *
  31. * @return void
  32. */
  33. public function down()
  34. {
  35. Schema::dropIfExists('admin_roles');
  36. }
  37. }