U4-8808 - Fixing up 301 redirects table (beta2)

Created by Claus Jensen 04 Aug 2016, 11:32:52 Updated by Sebastiaan Janssen 05 Aug 2016, 11:06:39

Is required for: U4-8361

Update the migration, models, services and repos in core:

  • Ensure the PK is a GUID instead of an INT
  • In the migration if the table does exist, drop the table first then have it re-created with the correct structure (this is for upgrades for sites coming from the beta)
  • Clean up existing migrations
  • Ensure indexes are applied correctly
  • Fix FK constraint failing when trying to delete content with redir urls
  • Change the hash of the URL hash to use SHA1 instead of MD5


Claus Jensen 04 Aug 2016, 13:40:58

PR: https://github.com/umbraco/Umbraco-CMS/pull/1411


  • Create content and publish
  • Rename content and publish
  • Ensure that a record in the umbracoRedirectUrl table exists for the old url
  • Delete content
  • Ensure that the redirect url was deleted from the database (and that no errors was shown in the UI while deleting) - remember to remove from recycle bin to completely delete the content

Claus Jensen 05 Aug 2016, 06:28:08

@sebastiaan Migration fixed so it checks for guid in the ID column and then cancels the migration if not needed :)

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.5.0

Due in version: 7.5.0

Sprint: Sprint 39

Story Points: