fix: rename SQL function to remove style of names#115
Merged
Conversation
* Rename `rm_mp_style` to `unstyled` * Make it remove link tags Refs: #112.
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request renames the SQL function rm_mp_style to unstyled and enhances it to remove link tags in addition to style codes from ManiaScript/TrackMania formatted names.
Key changes:
- Created a database migration that drops the old
rm_mp_stylefunction and creates the newunstyledfunction - Enhanced the regex pattern to handle link tags (
$l[...]and$L[...]) in addition to existing style codes - Updated all function calls across the codebase from
rm_mp_styletounstyled
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/player-map-ranking/src/lib.rs | Updated function calls from rm_mp_style to unstyled for map and player name processing |
| crates/migration/src/m20260109_101455_refactor_rm_mp_style/func_management.rs | New module defining constants for both old and new SQL function definitions |
| crates/migration/src/m20260109_101455_refactor_rm_mp_style/create_function_unstyled.sql | New SQL function definition with enhanced regex to remove link tags |
| crates/migration/src/m20260109_101455_refactor_rm_mp_style/create_function_rm_mp_style.sql | Preserved old function definition for migration rollback support |
| crates/migration/src/m20260109_101455_refactor_rm_mp_style.rs | Migration logic to drop old function and create new one with rollback capability |
| crates/migration/src/lib.rs | Registered the new migration in the migrator |
| crates/graphql-api/src/utils/records_filter.rs | Updated three function calls from rm_mp_style to unstyled for player/map name filtering |
| crates/graphql-api/src/objects/root.rs | Updated three function calls from rm_mp_style to unstyled for player/map name queries |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
crates/migration/src/m20260109_101455_refactor_rm_mp_style/create_new_function_rm_mp_style.sql
Outdated
Show resolved
Hide resolved
* Rename back `unstyled` SQL function to `rm_mp_style`. * Use new `unstyled` function in entity everywhere needed. Refs: #112.
…ate_new_function_rm_mp_style.sql Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rm_mp_styletounstyledRefs: #112.