aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-06 15:58:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-06 15:58:10 +0200
commit33ddbe3d3fd75f9ca11f7f1a721e2ba97b201753 (patch)
tree7f79338789eed9ffa08d40793b8b05fd01659b6d
parentebe3b3b99916a0b7ff04c8150d65feb4ea32e3c9 (diff)
Map QString to MySQL VARCHAR(128) instead of 255 to support 4-byte UTF-8
-rw-r--r--odb/qt/basic/mysql/default-mapping.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/odb/qt/basic/mysql/default-mapping.hxx b/odb/qt/basic/mysql/default-mapping.hxx
index 30a9ee6..eeddf49 100644
--- a/odb/qt/basic/mysql/default-mapping.hxx
+++ b/odb/qt/basic/mysql/default-mapping.hxx
@@ -9,11 +9,11 @@
#include <QtCore/QByteArray>
#include <QtCore/QUuid>
-// Map QString to MySQL TEXT for non-id and to VARCHAR(255) for id members.
+// Map QString to MySQL TEXT for non-id and to VARCHAR(128) for id members.
// MySQL cannot have primary key of the TEXT type. Allow NULL values by
// default as QString provides a null representation.
//
-#pragma db value(QString) type("TEXT") id_type("VARCHAR(255)") null
+#pragma db value(QString) type("TEXT") id_type("VARCHAR(128)") null
// Map QByteArray to MySQL BLOB by default. Allow NULL values by default as
// QByteArray provides a null representation.