Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem during migration when custom table name is set #150

Closed
witaway opened this issue Apr 14, 2024 · 1 comment
Closed

Problem during migration when custom table name is set #150

witaway opened this issue Apr 14, 2024 · 1 comment

Comments

@witaway
Copy link
Contributor

witaway commented Apr 14, 2024

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
Copy link
Owner

Z3d0X commented Apr 15, 2024

fixed in #151

@Z3d0X Z3d0X closed this as completed Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants