From 0ef5cb9079d7dd42c00c90a8c717acc9bd706ef6 Mon Sep 17 00:00:00 2001 From: witaway <32620044+witaway@users.noreply.github.com> Date: Sun, 14 Apr 2024 23:14:27 +0300 Subject: [PATCH] Fixed incorrect table name during migration Previously, when the fabricator table name was non-default, incorrect table name was used during creation self-reference. --- database/migrations/create_pages_table.php.stub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/migrations/create_pages_table.php.stub b/database/migrations/create_pages_table.php.stub index f185e80..783127c 100644 --- a/database/migrations/create_pages_table.php.stub +++ b/database/migrations/create_pages_table.php.stub @@ -14,7 +14,7 @@ return new class extends Migration $table->string('slug')->unique(); $table->string('layout')->default('default')->index(); $table->json('blocks'); - $table->foreignId('parent_id')->nullable()->constrained('pages')->cascadeOnDelete()->cascadeOnUpdate(); + $table->foreignId('parent_id')->nullable()->constrained(config('filament-fabricator.table_name', 'pages'))->cascadeOnDelete()->cascadeOnUpdate(); $table->timestamps(); }); }