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

augmentDatabase doesn't pick up new indexes added via project code extensions #341

Open
michalkleiner opened this issue Aug 17, 2021 · 1 comment

Comments

@michalkleiner
Copy link
Contributor

When custom code adds an index to e.g. SiteTree table, after the project was established for some time, augmentDatabase doesn't update the _Live and _Versions (and potentially other custom stages) tables with that index.

@emteknetnz
Copy link
Member

emteknetnz commented Sep 2, 2021

That seems like a rather large oversight, particularly for the Live table which would benefit the most from it since that's what used the vast bulk of the time

Presumably, based on the title of this issue, this is only applicable for extensions applied to DataObject, and not new models that extends DataObject

Where it should be adding the indexes
https://github.com/silverstripe/silverstripe-versioned/blob/1/src/Versioned.php#L943

Extension point
https://github.com/silverstripe/silverstripe-framework/blob/4/src/ORM/DataObject.php#L3650

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants