BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
home
/
imagivibe
/
public_html
/
app.imagivibe.com
/
database
/
migrations
📤 Upload
📝 New File
📁 New Folder
Close
Editing: 2024_08_16_105255_rollback_permission_table.php
<?php use App\Enums\Roles; use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { DB::table('users') ->where('type', 'super_admin') ->update(['type' => Roles::ADMIN->value]); Schema::dropIfExists('role_has_permissions'); Schema::dropIfExists('model_has_roles'); Schema::dropIfExists('model_has_permissions'); Schema::dropIfExists('roles'); Schema::dropIfExists('permissions'); } /** * Reverse the migrations. */ public function down(): void { // } };
Save
Cancel