Skip to content

Conversation

@kevinmeijer97
Copy link
Contributor

When the sites driver is kept on file and this migration gets added to your project the following error occurs when running the migrations.

Screenshot 2025-08-27 at 13 42 28

This is correct because the model is only binded on the app if the sites driver is configured as eloquent.

Screenshot 2025-08-27 at 13 45 00

I changed the migration to use the model from the config instead, this way it's always available.

@ryanmitchell
Copy link
Contributor

It would probably be better to update the UpdateScript for this migration to not publish if the site repository is not eloquent: https://github.com/statamic/eloquent-driver/blob/4.x/src/Updates/AddOrderToSitesTable.php

@kevinmeijer97
Copy link
Contributor Author

Agreed, changed it around to check for the config there instead!

@ryanmitchell
Copy link
Contributor

Looks good to me, thanks for making the changes.

@ryanmitchell ryanmitchell merged commit 3ec74ee into statamic:4.x Aug 27, 2025
19 checks passed
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.

2 participants