utopia-php / database

Lite & fast micro PHP database abstraction library that is **easy to use**.
MIT License
65 stars 48 forks source link

Fix index metadata becoming desynchronised when updating relationship names #452

Closed PineappleIOnic closed 1 month ago

PineappleIOnic commented 1 month ago

This PR fixes a bug regarding updating relationship attribute names, which occurs because after our method updates the index metadata with the correct data then updateAttributeMeta overwrites that with the original data.

To solve this, the index update code has been moved out of updateAttributeMeta; tests have also been added to check these changes solve the index doesn't exist bug when double updating relationship names.