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 database to UTF-8 collation and update project documentation #39

Merged
merged 4 commits into from
Nov 19, 2024

Conversation

stevewgr
Copy link
Member

Description

This pull request includes several changes to modernize the database setup, improve compatibility, and reflect the current state of the project:

  1. Update Database Collation:

    • Migrated the database to use the Latin1_General_100_CS_AS_SC_UTF8 collation, requiring MSSQL 2019 as the minimum supported version.
    • For older SQL Server versions, the collation can be reverted to SQL_Latin1_General_CP1_CI_AS by modifying the import.ps1 script. Note that UTF-8 compatibility is necessary for proper functionality.
    • UTF-8 ensures consistent behavior across different operating systems:
      • On Unix, UTF-8 is enabled by default.
      • On Windows, it can be enabled in Region settings under "Beta: Use Unicode UTF-8 for worldwide language support."
    • Additional context: PR discussion.
  2. Adjust VERSION Table:

    • Updated the VERSION table to match recent changes in LoginServer.
    • Set strFile to VARCHAR instead of NVARCHAR due to the new UTF-8-compatible collation.
  3. Update Documentation:

    • Revised the README.md file to reflect the current state of the project and provide accurate setup instructions.

Notes

  • The changes introduce MSSQL 2019 as a minimum requirement due to the adoption of UTF-8 collation.
  • For systems requiring compatibility with older SQL Server versions, users should adjust the collation accordingly.
  • These updates ensure better cross-platform support and simplify database configuration for new setups.

This change sets MSSQL 2019 as the minimum SQL Server version.
For older versions, the collation can be reverted to
`SQL_Latin1_General_CP1_CI_AS` by modifying the `import.ps1` script.
However, UTF-8 compatibility is required for proper functionality.

UTF-8 ensures consistent behavior regardless of the host system's
settings. On Unix, UTF-8 is typically enabled by default. On Windows,
it can be enabled under Region settings with "Beta: Use Unicode UTF-8
for worldwide language support."

For details, see this discussion:
ko4life-net/ko#260 (comment)
Note that we decided to set strFile as varchar instead of nvarchar
because of the newly updated UTF-8 compatible collation.
@stevewgr stevewgr self-assigned this Nov 19, 2024
Formatting migration scripts is now optional. While formatting is
helpful for table creation or altering procedures, it can be cumbersome
for large insert queries. Therefore, automatic formatting has been disabled.
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.

1 participant