Fix Event & EventType resource issues and apply formatting

- Fix EventType deletion error handling (constraint violations)
- Fix Event update error (package_id column missing)
- Fix Event Type dropdown options (JSON display issue)
- Fix EventPackagesRelationManager query error
- Add missing translations for deletion errors
- Apply Pint formatting
This commit is contained in:
Codex Agent
2026-01-21 10:34:06 +01:00
parent 198fbf6751
commit fa33e7cbcf
112 changed files with 334 additions and 280 deletions

View File

@@ -9,7 +9,7 @@ return new class extends Migration
public function up(): void
{
// Blog Categories
if (!Schema::hasTable('blog_categories')) {
if (! Schema::hasTable('blog_categories')) {
Schema::create('blog_categories', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
@@ -21,13 +21,13 @@ return new class extends Migration
$table->timestamps();
});
} else {
if (!Schema::hasColumn('blog_categories', 'name')) {
if (! Schema::hasColumn('blog_categories', 'name')) {
Schema::table('blog_categories', function (Blueprint $table) {
$table->string('name')->nullable()->after('id');
$table->longText('description')->nullable()->after('name');
});
}
if (!Schema::hasColumn('blog_categories', 'translations')) {
if (! Schema::hasColumn('blog_categories', 'translations')) {
Schema::table('blog_categories', function (Blueprint $table) {
$table->json('translations')->nullable()->after('description');
});
@@ -35,7 +35,7 @@ return new class extends Migration
}
// Blog Authors
if (!Schema::hasTable('blog_authors')) {
if (! Schema::hasTable('blog_authors')) {
Schema::create('blog_authors', function (Blueprint $table) {
$table->id();
$table->string('name');
@@ -49,7 +49,7 @@ return new class extends Migration
}
// Blog Posts
if (!Schema::hasTable('blog_posts')) {
if (! Schema::hasTable('blog_posts')) {
Schema::create('blog_posts', function (Blueprint $table) {
$table->id();
$table->foreignId('blog_author_id')->nullable()->constrained()->cascadeOnDelete();
@@ -65,7 +65,7 @@ return new class extends Migration
$table->timestamps();
});
} else {
if (!Schema::hasColumn('blog_posts', 'translations')) {
if (! Schema::hasColumn('blog_posts', 'translations')) {
Schema::table('blog_posts', function (Blueprint $table) {
$table->json('translations')->nullable()->after('content');
});
@@ -73,7 +73,7 @@ return new class extends Migration
}
// Tags
if (!Schema::hasTable('tags')) {
if (! Schema::hasTable('tags')) {
Schema::create('tags', function (Blueprint $table) {
$table->id();
$table->json('name');
@@ -85,7 +85,7 @@ return new class extends Migration
}
// Taggables (polymorphic)
if (!Schema::hasTable('taggables')) {
if (! Schema::hasTable('taggables')) {
Schema::create('taggables', function (Blueprint $table) {
$table->foreignId('tag_id')->constrained()->cascadeOnDelete();
$table->morphs('taggable');
@@ -124,4 +124,4 @@ return new class extends Migration
Schema::dropIfExists('blog_categories');
}
}
};
};