spatie / activitylog

A very simple activity logger to monitor the users of your website or application
https://spatie.be/opensource/laravel
MIT License
582 stars 75 forks source link

Migrations duplicating #18

Closed antonkomarev closed 8 years ago

antonkomarev commented 8 years ago

Hello, Freek.

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

freekmurze commented 8 years ago

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 commented 8 years ago

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