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-4993 Move PublicApiDataSet* columns from Files to ReleaseFiles #4979

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

ntsim
Copy link
Collaborator

@ntsim ntsim commented Jun 18, 2024

This PR moves the PublicApiDataSetId and PublicApiDataSetVersion columns from the content DB's Files table to ReleaseFiles.

This fixes an issue where creating a draft API data set for a ReleaseFile in an amendment can immediately show in the Data Catalogue as an API data set. This was due to the PublicApiDataSet* columns previously being on the Files table, meaning any changes would be shared between all ReleaseFiles sharing the same File.

⚠️ Note - To implement this, we also require an endpoint migration to unset the PublicApiDataSet* columns for any amendment ReleaseFiles that have already been created with this issue.

Signed-off-by: Nicholas Tsim <nicholastsim@gmail.com>
Comment on lines +419 to +424
entity.HasIndex(rf => new
{
rf.ReleaseVersionId,
rf.FileId,
})
.IsUnique();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this is unrelated to this PR but we just wanted to add this in because it should have always been there?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this is just to add a unique constraint that should have been there in the first place!

@ntsim ntsim merged commit 2fdb8e3 into dev Jun 19, 2024
7 checks passed
@ntsim ntsim deleted the ees-4993 branch June 19, 2024 09:02
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