diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-04-06 18:15:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-04-06 18:15:50 +0200 |
commit | 6a66f46d4b416ce3408f8d938032d8b95265b1bb (patch) | |
tree | dd65f790e2e07087df06ec374ecefc7bc33fd42e /odb/relational/mysql/schema.cxx | |
parent | fc65c4e978759fa10fc61341d98d4dccac42a53f (diff) |
Map string keys to MySQL VARCHAR(128) instead of 255 to support 4-byte UTF-8
This is a backwards-incompatible change in that it may change your schema.
To obtain the old behavior you will have to explicitly re-map std::string
with the id_type pragma or explicitly specify the database type for each
affected id member with the type pragma.
Diffstat (limited to 'odb/relational/mysql/schema.cxx')
-rw-r--r-- | odb/relational/mysql/schema.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/odb/relational/mysql/schema.cxx b/odb/relational/mysql/schema.cxx index 5b1ad26..fe29d03 100644 --- a/odb/relational/mysql/schema.cxx +++ b/odb/relational/mysql/schema.cxx @@ -461,7 +461,7 @@ namespace relational pre_statement (); os << "CREATE TABLE IF NOT EXISTS " << qt_ << " (" << endl - << " " << qn_ << " VARCHAR(255) NOT NULL PRIMARY KEY," << endl + << " " << qn_ << " VARCHAR(128) NOT NULL PRIMARY KEY," << endl << " " << qv_ << " BIGINT UNSIGNED NOT NULL," << endl << " " << qm_ << " TINYINT(1) NOT NULL)" << endl; |