Skip to content

Add :segment_id field to shared_links schema#5924

Merged
apata merged 3 commits into
masterfrom
limited-view/migrate-shared-links
Dec 4, 2025
Merged

Add :segment_id field to shared_links schema#5924
apata merged 3 commits into
masterfrom
limited-view/migrate-shared-links

Conversation

@apata

@apata apata commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

Changes

Adds field to shared_links schema that allows limiting that shared link to this particular segment only.

Tests

  • This PR does not require tests

Changelog

  • This PR does not make a user-facing change

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

Comment thread priv/repo/migrations/20251201154500_add_limited_to_segment_to_shared_links.exs Outdated
@apata apata marked this pull request as ready for review December 2, 2025 17:17
@apata apata requested a review from aerosol December 3, 2025 09:31
@apata apata changed the title Add :limited_to_segment_id field to shared_links schema Add :segment_id field to shared_links schema Dec 3, 2025
add :segment_id, references(:segments, on_delete: :delete_all)
end

create index(:shared_links, [:segment_id])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this feels unnecessary, foreign keys are indexes on their own?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤦 /me goes on a walk of shame

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ain't no shame, thanks for raising the question!

@apata apata added this pull request to the merge queue Dec 4, 2025
Merged via the queue into master with commit 1ff2b52 Dec 4, 2025
17 checks passed
@apata apata deleted the limited-view/migrate-shared-links branch February 11, 2026 11:35
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