Auto-formatted by Laravel Pint (default Laravel preset): string concatenation spacing, anonymous class brace placement, constructor body shorthand, import ordering, and assertion indentation.
32 lines
975 B
PHP
32 lines
975 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::table('users', function (Blueprint $table) {
|
|
$table->string('churchtools_id')->nullable()->unique()->after('email');
|
|
$table->string('avatar')->nullable()->after('password');
|
|
$table->json('churchtools_groups')->nullable()->after('avatar');
|
|
$table->json('churchtools_roles')->nullable()->after('churchtools_groups');
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::table('users', function (Blueprint $table) {
|
|
$table->dropUnique('users_churchtools_id_unique');
|
|
$table->dropColumn([
|
|
'churchtools_id',
|
|
'avatar',
|
|
'churchtools_groups',
|
|
'churchtools_roles',
|
|
]);
|
|
});
|
|
}
|
|
};
|