Add edit and delete discussions and comments#8566
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Migration ReviewOne of our most common issues is migrations that don't work with existing Overall Risk: SAFE Files Reviewed
FindingsNo issues found.
SummaryPurely additive schema change — new nullable columns plus three brand-new audit tables and a new enum, all with no impact on existing rows. No backfill, constraint violations, or unsafe casts. Safe to run against production data. |
tristanlabelle
left a comment
There was a problem hiding this comment.
I can sign off on the backend changes if you split this PR. It's very large to review the frontend part as well. Left noncritical comments.
aapeliv
left a comment
There was a problem hiding this comment.
let's also wait for ums/mod stuff first
|
Claude finished @nabramow's task in 45s —— View job Migration Review CompleteReviewed Overall Risk: SAFE — purely additive, all-nullable columns, no constraints or backfill needed. Full details posted in the migration review comment. |
|
Claude finished @nabramow's task in 57s —— View job Migration Review CompleteReviewed Overall Risk: SAFE — purely additive, all-nullable columns, no constraints or backfill needed. Verified |
|
Claude finished @nabramow's task in 1m 57s —— View job Migration ReviewOne of our most common issues is migrations that don't work with existing data in production. This is very hard to catch with CI, so we have this bot to check for potential problems. Overall Risk: SAFE Files Reviewed
FindingsNo issues found. Verification notes for this push (the migration grew since the previous review — it now also creates the version/audit tables):
SummaryPurely additive change: nullable columns on existing tables plus net-new audit tables and enum. No existing-data risk. Safe to run against production. |
|
Claude finished @nabramow's task in 4m 36s —— View job Migration Review CompleteReviewed Overall Risk: SAFE — purely additive. It adds nullable columns ( No backfill, constraint violations, or unsafe casts against existing data. Full details in the migration review comment. |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d7e817b to
062d459
Compare
|
Claude finished @aapeliv's task in 44s —— View job Migration ReviewOne of our most common issues is migrations that don't work with existing Overall Risk: SAFE Files Reviewed
FindingsNo issues found.
SummaryPurely additive change: nullable columns on existing tables plus net-new audit tables and a new enum. No existing-data risk — no backfill, constraint violations, or unsafe casts. Safe to run against production. |
aapeliv
left a comment
There was a problem hiding this comment.
let's also wait for ums/mod stuff first
| moderation_state_id: Mapped[int] = mapped_column(ForeignKey("moderation_states.id"), index=True) | ||
| created: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now(), init=False) | ||
| deleted: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), default=None) | ||
| last_edited: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), default=None) |
| content: Mapped[str] = mapped_column(String) # CommonMark without images | ||
| created: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now(), init=False) | ||
| deleted: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), default=None) | ||
| last_edited: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), default=None) |
| content: Mapped[str] = mapped_column(String) # CommonMark without images | ||
| created: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now(), init=False) | ||
| deleted: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), default=None) | ||
| last_edited: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), default=None) |
| thread=thread_to_pb(session, context, discussion.thread_id), | ||
| can_moderate=can_moderate, | ||
| can_edit=(context.user_id == discussion.creator_user_id), | ||
| last_edited=Timestamp_from_datetime(discussion.last_edited) if discussion.last_edited else None, |
📝 Release NotesThis PR should be included in the release notes. Suggested release note: 🤖 Bot Debug InformationModel: |
Adds the ability to update and edit discussions, comments and replies. A few decisions were made here:
Since this PR contains backend code it can't be tested on Vercel.
Closes #8565
Testing
Explain how you tested this PR and give clear steps so the reviewer can replicate.
Backend checklist
developif necessary for linear migration historyWeb frontend checklist
For maintainers