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

chore(rethinkdb): Comment: Phase 1 #10166

Merged
merged 5 commits into from
Aug 29, 2024
Merged

chore(rethinkdb): Comment: Phase 1 #10166

merged 5 commits into from
Aug 29, 2024

Conversation

mattkrick
Copy link
Member

@mattkrick mattkrick commented Aug 27, 2024

Description

Writes to PG

Comment is a tricky table to migrate.
Today, if a user gets hard deleted, we set the Comment’s userId to a tombstone (e.g. DELTED:local|123345).
In PG, every userId needs to reference a valid User.
We can relax that constraint & make userId nullable.
Alternatively, we can change the reference to a dummy userId like "A deleted User", but if we can avoid a dummy user, that would keep things simple.
Alternatively, we can delete that comment, but then all replies will have to have their threadParentId set to null, so the discussion shape would change dramatically.
Making userId seems to be the least obtrusive option.

Signed-off-by: Matt Krick <matt.krick@gmail.com>
Signed-off-by: Matt Krick <matt.krick@gmail.com>
Signed-off-by: Matt Krick <matt.krick@gmail.com>
Signed-off-by: Matt Krick <matt.krick@gmail.com>
@mattkrick mattkrick merged commit d712811 into master Aug 29, 2024
7 checks passed
@mattkrick mattkrick deleted the chore/Comment-phase1 branch August 29, 2024 01:52
@github-actions github-actions bot mentioned this pull request Aug 29, 2024
24 tasks
@Dschoordsch Dschoordsch mentioned this pull request Sep 10, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant