2020_07_11_151894_create_permissions_table.php 823 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. /**
  6. * Class CreatePermissionsTable
  7. *
  8. * @author Andrey Girnik <girnikandrey@gmail.com>
  9. */
  10. class CreatePermissionsTable extends Migration
  11. {
  12. /**
  13. * Run the migrations.
  14. * @return void
  15. */
  16. public function up()
  17. {
  18. Schema::create('permissions', function (Blueprint $table) {
  19. $table->increments('id');
  20. $table->string('name', 191);
  21. $table->string('slug', 191)->unique();
  22. $table->string('description', 191);
  23. $table->timestamps();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. * @return void
  29. */
  30. public function down()
  31. {
  32. Schema::dropIfExists('permissions');
  33. }
  34. }