Migrate database schema to modern types and improve string handling #37
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.
Description
This pull request migrates the database to address legacy data types and improve storage and processing efficiency. Specifically:
Migration from
ntext
/text
tovarchar
:K_NPCPOS
to align with the official configuration and the loading order used byN3ME
and server files.Migration from
CHAR
toVARCHAR
:CHAR
columns caused inconsistencies due to fixed length and padded whitespaces.VARCHAR
handles variable-length strings more efficiently, reducing IO overhead, optimizing storage, and improving performance.CHAR
and addresses inefficiencies in storage and operations.Additional Notes
Latin1_General_100_CS_AS_SC_UTF8
.Trim
function to handle trailing spaces in strings retrieved fromCHAR
columns. With this migration toVARCHAR
, such trimming may no longer be necessary but can remain in place without causing any issues. Cleanup of this logic can be done incrementally.Why These Changes?
Impact
Next Steps
Further cleanup tasks, such as updating server-side string handling logic (e.g., trimming), can be addressed incrementally without immediate urgency.