Skip to content

Commit

Permalink
Fixes datlechin#28
Browse files Browse the repository at this point in the history
Fixes:
SQLSTATE[HY000]: General error: 1 no such table: main.parents (Connection: sqlite, SQL: insert into "menu_items" ("title", "url", "order", "menu_id", "updated_at", "created_at") values (Dashboard, http://127.0.0.1:8000, 1, 1, 2024-09-08 16:54:09, 2024-09-08 16:54:09))
  • Loading branch information
bdsumon4u authored Sep 15, 2024
1 parent 894ee89 commit e751026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/migrations/create_menus_table.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ return new class extends Migration
Schema::create(config('filament-menu-builder.tables.menu_items'), function (Blueprint $table) {
$table->id();
$table->foreignIdFor(Menu::class)->constrained()->cascadeOnDelete();
$table->foreignIdFor(Menu::class, 'parent_id')->nullable()->constrained()->nullOnDelete();
$table->foreignIdFor(Menu::class, 'parent_id')->nullable()->constrained($table->getTable())->nullOnDelete();
$table->nullableMorphs('linkable');
$table->string('title');
$table->string('url')->nullable();
Expand Down

0 comments on commit e751026

Please sign in to comment.