Skip to content
This repository has been archived by the owner on Jun 1, 2019. It is now read-only.

Migrations duplicating #18

Closed
antonkomarev opened this issue Oct 11, 2015 · 2 comments
Closed

Migrations duplicating #18

antonkomarev opened this issue Oct 11, 2015 · 2 comments

Comments

@antonkomarev
Copy link

Hello, Freek.

Because in ServiceProvider there is no checks if migration was already published before it's duplucating after each vendor:publish command.

@freekmurze
Copy link
Member

I don't recommend using vendor:publish without flags. It's a good idea to always specify the service provider of which you want to assets to install eg:

php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider"

Of course you should execute that command only once (otherwise you'll still get duplicate migrations).

I could solve this problem not using a timestamp in the name of the migration, but I prefer a timestamp being there.

@antonkomarev
Copy link
Author

I've removed timestamps in my packages too and performing a check if current classname already exists in migrations directory before publishing it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants