Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh install is broken due to wrong order of migrations #46

Open
mjess opened this issue Jan 8, 2025 · 0 comments · May be fixed by #49
Open

Fresh install is broken due to wrong order of migrations #46

mjess opened this issue Jan 8, 2025 · 0 comments · May be fixed by #49

Comments

@mjess
Copy link

mjess commented Jan 8, 2025

Subject of the issue

On a fresh install of v4.0.0 in a fresh laravel project the migration fails.
Seems like both the "add_parameters_to_route_statistics_table" and "create_route_statistics_table" get created with exactly the same timestamp and thus the "add" one is run before the "create" one.

Your environment

Windows 10
Laravel v11.5.0
Laravel-route-statistics v4.0.0

Steps to reproduce

laravel new example-app
cd example-app
composer require bilfeldt/laravel-route-statistics
php artisan vendor:publish --provider="Bilfeldt\LaravelRouteStatistics\LaravelRouteStatisticsServiceProvider" --tag="migrations"
php artisan migrate

Expected behaviour

Migration should pass

Actual behaviour

PDOException::("SQLSTATE[42S02]: Base table or view not found: 1146 Table 'example_app.route_statistics' doesn't exist")

grafik

I could fix this on my end by giving new timestamps to the migration filenames and thus bring them in the correct order.

@alexjustesen alexjustesen linked a pull request Jan 29, 2025 that will close this issue
8 tasks
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 a pull request may close this issue.

1 participant