Update migrations

This commit is contained in:
Daniel Supernault 2024-01-01 16:19:24 -07:00
parent 7dbdbf15a5
commit 7b6c9c7428
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1
2 changed files with 5 additions and 0 deletions

View file

@ -16,6 +16,7 @@ return new class extends Migration
$table->unsignedBigInteger('profile_id')->unique()->index();
$table->unsignedInteger('user_id')->unique()->index();
$table->json('roles')->nullable();
$table->json('meta')->nullable();
$table->timestamps();
});
}

View file

@ -13,6 +13,8 @@ return new class extends Migration
{
Schema::table('users', function (Blueprint $table) {
$table->boolean('has_roles')->default(false);
$table->unsignedInteger('parent_id')->nullable();
$table->tinyInteger('role_id')->unsigned()->nullable()->index();
});
}
@ -23,6 +25,8 @@ return new class extends Migration
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('has_roles');
$table->dropColumn('parent_id');
$table->dropColumn('role_id');
});
}
};