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

EES-5631 Adding ReleaseRedirects table to the Content DB #5387

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Conversation

jack-hive
Copy link
Collaborator

@jack-hive jack-hive commented Nov 12, 2024

This PR adds a ReleaseRedirects table to the Content DB.

With the introduction of a new Label concept in EES-5626, and the ability to edit that Label in EES-5637, we will now be introducing the ability to change the Slug for a Release, which necessitates the introduction of Release Redirects.

The ReleaseRedirects schema is as the following:

  • Slug - the previous slug of the Release
  • ReleaseId - a foreign key to the Id primary key of the Releases table. Used to redirect to the new Slug
  • Created - timestamp of when this redirect was created

We follow the same pattern as for the existing Publication and Methodology redirects.

@tomjonesdev
Copy link
Collaborator

I may have missed/misunderstood something from the tickets, but since a redirect is linked to a specific Release (rather than a ReleaseVersion), I gather we only retain a single previous item in the Slug field? If so, what happens if the slug is changed more than once?

Or is the idea that a new record is created each time the slug changes, and the ReleaseId is used alongside the Created property to determine the newest? If so, was a JSON field containing an array of redirects considered?

@jack-hive
Copy link
Collaborator Author

I may have missed/misunderstood something from the tickets, but since a redirect is linked to a specific Release (rather than a ReleaseVersion), I gather we only retain a single previous item in the Slug field? If so, what happens if the slug is changed more than once?

Or is the idea that a new record is created each time the slug changes, and the ReleaseId is used alongside the Created property to determine the newest? If so, was a JSON field containing an array of redirects considered?

We cleared this up on a call :)

@jack-hive jack-hive merged commit 05bc5d5 into dev Nov 13, 2024
8 checks passed
@jack-hive jack-hive deleted the EES-5631 branch November 13, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants