Z3d0X / filament-fabricator

Block-Based Page Builder Skeleton for your Filament Apps
https://filamentphp.com/plugins/fabricator
MIT License
251 stars 48 forks source link

Problem during migration when custom table name is set #150

Closed witaway closed 2 months ago

witaway commented 2 months ago

I changed fabricator table name so it couldn't conflict with "pages" table I want to create later. Got an error during migration.

The config config/filament-fabricator.php:

<?php

// config for Z3d0X/FilamentFabricator
return [
    ...
    'table_name' => 'fabricator_pages',
];

The error on php artisan migrate:

SQLSTATE[HY000]: General error: 1824 Failed to open the referenced table 'pages' (Connection: mysql, SQL: alter table `fabricator_pages` add constraint `fabricator_pages_parent_id_foreign` foreign key (`parent_id`) references `pages` (`id`) on delete cascade on update cascade)
Z3d0X commented 2 months ago

fixed in #151