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

refactor: store user shortcodes as [user=ID] #2606

Merged

Conversation

wescopeland
Copy link
Member

@wescopeland wescopeland commented Aug 11, 2024

Command to run after deploy:

sail artisan ra:community:migrate-user-shortcodes

This PR adjusts how [user] shortcodes are stored in the ForumTopicComment and messages tables.

With this PR's changes, a body like:

Hello [user=Scott]. I hope you are having a nice day.

will now be stored in the DB as:

Hello [user=1]. I hope you are having a nice day.

This is all done invisibly to the end user. A command is included to migrate the ForumTopicComment and messages table to the new format:

sail artisan ra:community:migrate-user-shortcodes
sail artisan ra:community:migrate-user-shortcodes --undo

@wescopeland wescopeland requested a review from a team August 11, 2024 15:41
@wescopeland wescopeland added the deployment/command Includes an Artisan command that needs to be run before/during deployment label Aug 11, 2024
app/Helpers/shortcode.php Show resolved Hide resolved
app/Support/Shortcode/Shortcode.php Outdated Show resolved Hide resolved
@wescopeland wescopeland merged commit 9443167 into RetroAchievements:master Aug 25, 2024
5 checks passed
@wescopeland wescopeland deleted the user-shortcodes-as-ids branch August 25, 2024 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment/command Includes an Artisan command that needs to be run before/during deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants