Turns out it's pointless to add "default_administration", you can force that already through the owner role (which is already in place).

This commit is contained in:
James Cole
2024-04-01 14:15:35 +02:00
parent cc32578c5f
commit 5b83c33039
4 changed files with 27 additions and 135 deletions

View File

@@ -1,35 +0,0 @@
<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\QueryException;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class () extends Migration {
/**
* Run the migrations.
*/
public function up(): void
{
try {
Schema::table(
'user_groups',
static function (Blueprint $table): void {
if (!Schema::hasColumn('user_groups', 'default_administration')) {
$table->boolean('default_administration')->default(false)->after('title');
}
}
);
} catch (QueryException $e) {
app('log')->error(sprintf('Could not execute query: %s', $e->getMessage()));
app('log')->error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
}
}
/**
* Reverse the migrations.
*/
public function down(): void {}
};