Umbraco-CMS icon indicating copy to clipboard operation
Umbraco-CMS copied to clipboard

Issue-12704: added new necessary indexes.

Open LegateJD opened this issue 2 years ago • 4 comments

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 image

[IX_umbracoContentVersionCultureVariation] index for [dbo].[umbracoContentVersionCultureVariation] table image

[IX_umbracoNode_ObjectType_trashed_sorted] index for [dbo].[umbracoNode] table image

[IX_umbracoRedirectUrl_culture_hash] index for [dbo].[umbracoRedirectUrl] table image

Added possibility to assign multiple IndexAttributes to DTO properties. image

Steps to reproduce

  1. Set up Umbraco CMS.
  2. 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.

LegateJD avatar Jul 29 '22 23:07 LegateJD

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 🤖 🙂

github-actions[bot] avatar Jul 29 '22 23:07 github-actions[bot]

@nzdev , please, review.

LegateJD avatar Jul 31 '22 23:07 LegateJD

Looks good to me.

nzdev avatar Aug 02 '22 10:08 nzdev

@nzdev , can you approve this PR by clicking check mark for this PR?

LegateJD avatar Aug 04 '22 14:08 LegateJD

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:

  1. Remove the _ParentId index as suggested by nzdev
  2. Fix the conflicts (sorry)
  3. 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

JasonElkin avatar May 17 '23 10:05 JasonElkin

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.

LegateJD avatar May 17 '23 15:05 LegateJD

Super, thanks @LegateJD!

I'll get this tested and get back to you as soon as I can.

JasonElkin avatar May 17 '23 17:05 JasonElkin

Tested and merged! 🚀🎉

Thanks again @LegateJD and @nzdev for this - I'll go ahead and close the issue too.

JasonElkin avatar May 18 '23 11:05 JasonElkin