Skip to content

Commit

Permalink
Fixed incorrect table name during migration
Browse files Browse the repository at this point in the history
Previously, when the fabricator table name was non-default, incorrect table name was used during creation self-reference.
  • Loading branch information
witaway authored Apr 14, 2024
1 parent 2969386 commit 0ef5cb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/migrations/create_pages_table.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}
Expand Down

0 comments on commit 0ef5cb9

Please sign in to comment.