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

Migrate comment's associated page to use id #2175

Closed
wants to merge 1 commit into from

Conversation

int-y1
Copy link
Contributor

@int-y1 int-y1 commented Feb 6, 2023

Fixes #2145. List of changes:

  • Create page_old that holds the old values. Admins can see page_old, and this field won't be used anywhere.
  • Change links from string to id. c:contestkey p:problemcode s:problemcode -> c:123 p:123 s:123. If id doesn't exist, use 0.
  • Update Comment.most_recent and Comment.link to use id. This affects the home page's "Comment stream". (Also update get_page_title and is_accessible_by)

I did some simple testing and nothing died. This pr needs more testing.

(Tickets aren't affected because they use content_type and object_id)

Future tasks:

  • Update comments / comment locks that refer to c:0 p:0 s:0.
  • Delete page_old.

@int-y1 int-y1 marked this pull request as ready for review February 6, 2023 10:57
@int-y1
Copy link
Contributor Author

int-y1 commented Feb 19, 2023

It's bad design to put id into a CharField. If the id approach is used, it's better to do what tickets do.

@int-y1 int-y1 closed this Feb 19, 2023
@int-y1 int-y1 deleted the comment-id branch August 23, 2023 07:27
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.

Comment page is not changed when object code is changed
1 participant