When calling a command "php artisan migrate:refresh" - Duplicate table: 7 ERROR: relation "media" already exists
antonsmolko opened this issue · comments
Hi!
Firstly, thanks for your package!
When calling a command php artisan migrate:refresh
, the following exception occurs
Duplicate table: 7 ERROR: relation "media" already exists
For example, I do not even need to use this table. So how do I use my custom with wider settings.
Can make it possible not to add migration? Or at least make sure that migration is deleted during rollback?
public function down()
{
Schema::dropIfExists('media');
}
@antonsmolko I need to make the publishing the migration package optional. Will fix it tonight.
For the main time, you can just delete the migration file from the vendor package folder and delete the registration of the migration from your migration table @antonsmolko
@antonsmolko I just fixed this in a new release. Now, it does not automatically load the package migration file.
You have to manually publish the migration file with:
php artisan vendor:publish --provider="Unicodeveloper\Cloudinary\CloudinaryServiceProvider" --tag=laravel-cloudinary-migration
Then, run php artisan migrate
to create the table in your DB.
@unicodeveloper Thank you!