Add admin flags to users table

This commit is contained in:
Matt Young 2024-05-28 11:22:55 -05:00
parent cc46b76039
commit f7f82f0d20
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->boolean('is_admin')->default('0');
$table->boolean('is_tab')->default('0');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('is_admin');
$table->dropColumn('is_tab');
});
}
};