tomatophp / filament-media-manager

Manage your media files using spatie media library with easy to use GUI for FilamentPHP
https://tomatophp.com/en/open-source/filament-media-manager
MIT License
67 stars 10 forks source link

error when migrate #15

Closed teshanna969 closed 2 months ago

teshanna969 commented 2 months ago

fresh install your plugin with laravel 11 and filament v3 after migrate SQLSTATE[HY000]: General error: 1824 Failed to open the referenced table 'media' (Connection: mysql, SQL: alter table media_has_models add constraint media_has_models_media_id_foreign foreign key (media_id) references media (id) on delete cascade

3x1io commented 2 months ago

hi @teshanna969 it's fixed on the last version, now you can check the install command I will publish the media table.

robertoliera commented 2 months ago

hi @3x1io I tried to install and run the command: php artisan filament-media-manager:install but it shows: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (Connection: mysql, SQL: alter tablemedia_has_modelsadd constraintmedia_has_models_media_id_foreignforeign key (media_id) referencesmedia(id) on delete cascade)

I'm using Laravel 10, php 8.1