Umbraco-CMS
Umbraco-CMS copied to clipboard
Issue-12704: added new necessary indexes.
Prerequisites
- [x] I have added steps to test this contribution in the description below
If there's an existing issue for this PR then this fixes
Description
Added absent indexes that were mentioned in #12704 issue.
[IX_umbracoContentVersion_NodeIdV2] index for [dbo].[umbracoContentVersion] table
[IX_umbracoContentVersionCultureVariation] index for [dbo].[umbracoContentVersionCultureVariation] table
[IX_umbracoNode_ObjectType_trashed_sorted] index for [dbo].[umbracoNode] table
[IX_umbracoRedirectUrl_culture_hash] index for [dbo].[umbracoRedirectUrl] table
Added possibility to assign multiple IndexAttributes
to DTO properties.
Steps to reproduce
- Set up Umbraco CMS.
- Check indexes via SSMS or with query
SELECT TableName = t.name, IndexName = ind.name, IndexId = ind.index_id, ColumnId = ic.index_column_id, ColumnName = col.name, ind.*, ic.*, col.* FROM sys.indexes ind INNER JOIN sys.index_columns ic ON ind.object_id = ic.object_id and ind.index_id = ic.index_id INNER JOIN sys.columns col ON ic.object_id = col.object_id and ic.column_id = col.column_id INNER JOIN sys.tables t ON ind.object_id = t.object_id WHERE ind.is_primary_key = 0 AND ind.is_unique = 0 AND ind.is_unique_constraint = 0 AND t.is_ms_shipped = 0 ORDER BY t.name, ind.name, ind.index_id, ic.is_included_column, ic.key_ordinal;
by listing all indexes.
Hi there @LegateJD, thank you for this contribution! 👍
While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
- It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
- The automated tests all pass (see "Checks" tab on this PR)
- The level of security for this contribution is the same or improved
- The level of performance for this contribution is the same or improved
- Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
- If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
- [x] 💡 The contribution looks original and the contributor is presumably allowed to share it
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution.
If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request.
Thanks, from your friendly Umbraco GitHub bot 🤖 🙂
@nzdev , please, review.
Looks good to me.
@nzdev , can you approve this PR by clicking check mark for this PR?
Hey @LegateJD, thanks for contributing this! It looks like this PR gotten stuck - let's see if we can unstick it and get this merged in!
While we wait for feedback on this comment, would you be able to make the rest of the necessary changes:
- Remove the _ParentId index as suggested by nzdev
- Fix the conflicts (sorry)
- Update references from 10.2.0 to 12.1.0, which this PR will target if we manage to get this merged soon.
Thanks, Jason
Hi @JasonElkin , I resolved all the issues that you mentioned. I also reverted line of code that @nzdev and @ronaldbarendse had been discussing; if it's not needed I'll return it to previous state.
Super, thanks @LegateJD!
I'll get this tested and get back to you as soon as I can.
Tested and merged! 🚀🎉
Thanks again @LegateJD and @nzdev for this - I'll go ahead and close the issue too.