From 07513aa37708a6f0dd4e8e73844a5d9622670d80 Mon Sep 17 00:00:00 2001 From: silverqx Date: Wed, 5 Jun 2024 10:22:06 +0200 Subject: [PATCH] used utf8mb4_uca1400_ai_ci for MariaDB --- examples/tom/main.cpp | 2 +- include/orm/constants_extern.hpp | 2 +- include/orm/constants_inline.hpp | 2 +- src/orm/constants_extern.cpp | 2 +- tests/TinyUtils/src/databases.cpp | 4 ++-- tests/testdata_tom/main.cpp | 2 +- tom/include/tom/migration.hpp | 4 ++-- tom/include/tom/seeder.hpp | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/tom/main.cpp b/examples/tom/main.cpp index fcf916f74..6c81bc0c2 100644 --- a/examples/tom/main.cpp +++ b/examples/tom/main.cpp @@ -106,7 +106,7 @@ std::shared_ptr setupDatabaseManager() {password_, qEnvironmentVariable("DB_MARIA_PASSWORD", EMPTY)}, {charset_, qEnvironmentVariable("DB_MARIA_CHARSET", UTF8MB4)}, {collation_, qEnvironmentVariable("DB_MARIA_COLLATION", - UTF8MB4Unicode520ci)}, + UTF8MB4Uca1400aici)}, // SYSTEM - set the time zone to your local MySQL server time zone {timezone_, TZ00}, /* Specifies what time zone all QDateTime-s will have, the overridden default diff --git a/include/orm/constants_extern.hpp b/include/orm/constants_extern.hpp index 838ee71d3..149c1dc70 100644 --- a/include/orm/constants_extern.hpp +++ b/include/orm/constants_extern.hpp @@ -157,7 +157,7 @@ namespace Orm::Constants SHAREDLIB_EXPORT extern const QString UTF8Unicodeci; SHAREDLIB_EXPORT extern const QString UTF8MB4Unicode520ci; SHAREDLIB_EXPORT extern const QString UTF8MB40900aici; - SHAREDLIB_EXPORT extern const QString Uca1400Nopadaici; + SHAREDLIB_EXPORT extern const QString UTF8MB4Uca1400aici; SHAREDLIB_EXPORT extern const QString UcsBasic; SHAREDLIB_EXPORT extern const QString POSIX_; diff --git a/include/orm/constants_inline.hpp b/include/orm/constants_inline.hpp index 608e86a78..2cd25c27e 100644 --- a/include/orm/constants_inline.hpp +++ b/include/orm/constants_inline.hpp @@ -164,7 +164,7 @@ namespace Orm::Constants inline const QString UTF8Unicodeci = QStringLiteral("utf8_unicode_ci"); inline const QString UTF8MB4Unicode520ci = QStringLiteral("utf8mb4_unicode_520_ci"); inline const QString UTF8MB40900aici = QStringLiteral("utf8mb4_0900_ai_ci"); - inline const QString Uca1400Nopadaici = QStringLiteral("uca1400_nopad_ai_ci"); + inline const QString UTF8MB4Uca1400aici = QStringLiteral("utf8mb4_uca1400_ai_ci"); // MariaDB 11.5 inline const QString UcsBasic = QStringLiteral("ucs_basic"); inline const QString POSIX_ = QStringLiteral("POSIX"); diff --git a/src/orm/constants_extern.cpp b/src/orm/constants_extern.cpp index 28e013709..82fcaab13 100644 --- a/src/orm/constants_extern.cpp +++ b/src/orm/constants_extern.cpp @@ -146,7 +146,7 @@ namespace Orm::Constants const QString UTF8Unicodeci = QStringLiteral("utf8_unicode_ci"); const QString UTF8MB4Unicode520ci = QStringLiteral("utf8mb4_unicode_520_ci"); const QString UTF8MB40900aici = QStringLiteral("utf8mb4_0900_ai_ci"); - const QString Uca1400Nopadaici = QStringLiteral("uca1400_nopad_ai_ci"); + const QString UTF8MB4Uca1400aici = QStringLiteral("utf8mb4_uca1400_ai_ci"); // MariaDB 11.5 const QString UcsBasic = QStringLiteral("ucs_basic"); const QString POSIX_ = QStringLiteral("POSIX"); diff --git a/tests/TinyUtils/src/databases.cpp b/tests/TinyUtils/src/databases.cpp index c54e9a166..f2d34f08a 100644 --- a/tests/TinyUtils/src/databases.cpp +++ b/tests/TinyUtils/src/databases.cpp @@ -30,7 +30,7 @@ using Orm::Constants::UTC; using Orm::Constants::UTF8; using Orm::Constants::UTF8MB4; using Orm::Constants::UTF8MB40900aici; -using Orm::Constants::UTF8MB4Unicode520ci; +using Orm::Constants::UTF8MB4Uca1400aici; using Orm::Constants::InnoDB; using Orm::Constants::Version; using Orm::Constants::application_name; @@ -674,7 +674,7 @@ Databases::mariaConfiguration() {password_, qEnvironmentVariable("DB_MARIA_PASSWORD", EMPTY)}, {charset_, qEnvironmentVariable("DB_MARIA_CHARSET", UTF8MB4)}, {collation_, qEnvironmentVariable("DB_MARIA_COLLATION", - UTF8MB4Unicode520ci)}, + UTF8MB4Uca1400aici)}, // Very important for tests {timezone_, TZ00}, /* Specifies what time zone all QDateTime-s will have, the overridden default diff --git a/tests/testdata_tom/main.cpp b/tests/testdata_tom/main.cpp index cf61d03b8..9404db62f 100644 --- a/tests/testdata_tom/main.cpp +++ b/tests/testdata_tom/main.cpp @@ -121,7 +121,7 @@ std::shared_ptr setupDatabaseManager() {password_, qEnvironmentVariable("DB_MARIA_PASSWORD", EMPTY)}, {charset_, qEnvironmentVariable("DB_MARIA_CHARSET", UTF8MB4)}, {collation_, qEnvironmentVariable("DB_MARIA_COLLATION", - UTF8MB4Unicode520ci)}, + UTF8MB4Uca1400aici)}, // SYSTEM - set the time zone to your local MySQL server time zone {timezone_, TZ00}, /* Specifies what time zone all QDateTime-s will have, the overridden default diff --git a/tom/include/tom/migration.hpp b/tom/include/tom/migration.hpp index ab6b3f530..0aa943871 100644 --- a/tom/include/tom/migration.hpp +++ b/tom/include/tom/migration.hpp @@ -169,8 +169,8 @@ namespace Migrations using TINYORM_PREPEND_NAMESPACE(Orm::Constants::UTF8MB4Unicode520ci); // NOLINT(misc-unused-using-decls) /*! Alias for the string constant "utf8mb4_0900_ai_ci". */ using TINYORM_PREPEND_NAMESPACE(Orm::Constants::UTF8MB40900aici); // NOLINT(misc-unused-using-decls) - /*! Alias for the string constant "uca1400_nopad_ai_ci". */ - using TINYORM_PREPEND_NAMESPACE(Orm::Constants::Uca1400Nopadaici); // NOLINT(misc-unused-using-decls) + /*! Alias for the string constant "utf8mb4_uca1400_ai_ci". */ + using TINYORM_PREPEND_NAMESPACE(Orm::Constants::UTF8MB4Uca1400aici); // NOLINT(misc-unused-using-decls) /*! Alias for the string constant "ucs_basic". */ using TINYORM_PREPEND_NAMESPACE(Orm::Constants::UcsBasic); // NOLINT(misc-unused-using-decls) /*! Alias for the string constant "POSIX". */ diff --git a/tom/include/tom/seeder.hpp b/tom/include/tom/seeder.hpp index 1089c19b9..62856f3fd 100644 --- a/tom/include/tom/seeder.hpp +++ b/tom/include/tom/seeder.hpp @@ -286,8 +286,8 @@ namespace Seeders using TINYORM_PREPEND_NAMESPACE(Orm::Constants::UTF8MB4Unicode520ci); // NOLINT(misc-unused-using-decls) /*! Alias for the string constant "utf8mb4_0900_ai_ci". */ using TINYORM_PREPEND_NAMESPACE(Orm::Constants::UTF8MB40900aici); // NOLINT(misc-unused-using-decls) - /*! Alias for the string constant "uca1400_nopad_ai_ci". */ - using TINYORM_PREPEND_NAMESPACE(Orm::Constants::Uca1400Nopadaici); // NOLINT(misc-unused-using-decls) + /*! Alias for the string constant "utf8mb4_uca1400_ai_ci". */ + using TINYORM_PREPEND_NAMESPACE(Orm::Constants::UTF8MB4Uca1400aici); // NOLINT(misc-unused-using-decls) /*! Alias for the string constant "ucs_basic". */ using TINYORM_PREPEND_NAMESPACE(Orm::Constants::UcsBasic); // NOLINT(misc-unused-using-decls) /*! Alias for the string constant "POSIX". */