Skip to content

Add multi-level link expansion for edition links - #4153

Draft
brucebolt wants to merge 6 commits into
mainfrom
implement-edition-link-expansion
Draft

Add multi-level link expansion for edition links#4153
brucebolt wants to merge 6 commits into
mainfrom
implement-edition-link-expansion

Conversation

@brucebolt

Copy link
Copy Markdown
Member

This is a continuation of #2605, which has been rebased against the main branch.

brucebolt and others added 6 commits August 10, 2026 10:42
Between the last commit and this one, ADR-009 was added. This removes
the need for many of the joins we previously had.

https://github.com/alphagov/publishing-api/blob/main/docs/arch/adr-009-change-linksets-primary-key-to-content-id.md
This makes a few of the tests pass. I'm not really sure why.
This matches the change made in 4dbf067
SELECT nested_links.id
FROM links AS nested_links
WHERE nested_links.link_set_content_id = links.target_content_id
#{and_not_parent('nested_links.target_content_id')}
SELECT nested_links.id
FROM links AS nested_links
WHERE nested_links.target_content_id = links.link_set_content_id
#{and_not_parent('nested_links.target_content_id')}
SELECT nested_links.id
FROM links AS nested_links
WHERE #{query}
#{and_not_parent('nested_links.target_content_id')}
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