statamic / eloquent-driver

Provides support for storing your Statamic data in a database, rather than flat files.
https://statamic.dev/tips/storing-content-in-a-database
MIT License
108 stars 78 forks source link

Update entry URIs when collection route is changed #379

Closed duncanmcclean closed 5 days ago

duncanmcclean commented 1 week ago

This pull request fixes an issue when changing a collection's route, where it wouldn't trigger the uri column on the entries table to be updated.

Closes #378.

ryanmitchell commented 1 week ago

This looks good but will only work if you have both collection and entries eloquent driven.

If you have collections file driven, then this wouldn't update the eloquent entries with the new route (which I'd guess is the more common config).

Maybe we are ok with that, but thought I'd mention it for discussion.

duncanmcclean commented 1 week ago

Oh, good point!

Ideally, it'd work if your collections were stored as flat files too. I'll have a think about the best way to approach it 🤔

duncanmcclean commented 5 days ago

Closing in favour of statamic/cms#11150.