2025_09_25_100000_create_roles_table.php 701 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. use App\Database\Migrations\TenantMigration;
  6. return new class extends TenantMigration
  7. {
  8. /**
  9. * Run the migrations.
  10. */
  11. public function up(): void
  12. {
  13. Schema::create('roles', function (Blueprint $table) {
  14. $table->id();
  15. $table->string('name');
  16. $table->boolean('enabled')->default(1);
  17. $table->softDeletes();
  18. $table->timestamps();
  19. });
  20. }
  21. /**
  22. * Reverse the migrations.
  23. */
  24. public function down(): void
  25. {
  26. Schema::dropIfExists('roles');
  27. }
  28. };