Skip to content

Conversation

@dev-idkwhoami
Copy link

TL;DR

  • Allows for renaming migrations after publishing

Why are these changes necessary ?

If somebody wants to rename the published migrations, the way they used to be loaded, it would cause the migrations to run twice since the name wouldn't match anymore.

According to the documentation publishing migrations is a required step anyway. (Quickstart - Verbs)
So there is no need to load the migrations within the package.

What was changed ?

The package uses the PackageServiceProvider so instead of manually registering and loading the migrations, we use hasMigrations in configurePackage().

The migration files had the timestamp prefix removed too, since the spatie package adds those automatically.

Migrations can still be published using the same command
php artisan vendor:publish --tag=verbs-migrations

Removing timestamped prefixes and registering them directly in the service provider using `hasMigrations`. Removed manual publishing and loading of migrations.
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

Successfully merging this pull request may close these issues.

1 participant