forums › forums › SQLyog › Using SQLyog › Does Not Support Pk's On String Types
- This topic is empty.
-
AuthorPosts
-
-
June 26, 2009 at 8:13 pm #11561katsueyMember
I keep getting these messages when trying to sync database on server to db on my computer even when I have deleted the tables on my computer and reconstructed them with the data on the server (using both the 8.12 stable and the 8.13 beta on Win/ Vista):
WARNING:Sync of table `tbl_customers` was aborted as data sync does not support PK's on string types using a binary or case sensitive collation
WARNING:Sync of table `tbl_orders` was aborted as data sync does not support PK's on string types using a binary or case sensitive collation
Please help!
-
June 26, 2009 at 9:39 pm #29216peterlaursenParticipant
The error message is clear: We do not support Primary Keys based on strings columns with a binary (or case sensitive) collation. Because it would not be safe to do (as wrong UPDATES could happen)
Cant you use a case-insensitive collation on those colums? Or have an auto-increment integer PK column in the tables instead?
-
June 26, 2009 at 10:58 pm #29217katsueyMember
Afraid it's not quite clear to me. Does that mean I should set the table to utf8_unicode_ci – if not, what?
-
June 27, 2009 at 8:14 am #29218peterlaursenParticipant
I think the PK columns are now using utf8_bin collation? utf8_unicode_ci or utf8_general_ci (or any utf8_**_ci) are the alternatives (utf8_general_ci is fastest, but utf8_unicode_ci handles a few national characters more correct (most important German 'sharp s' as far as I remember). I do not know your application and cannot tell how the PK is defined and thus also not if it is feasible to change with that application.
All such customer/order databases I have seen before would use an auto_increment integer PK.
If PK columns currently are not utf8_bin then it looks like a bug in SQLyog In that case please paste the CREATE STATEMENT for the two tables.
-
-
AuthorPosts
- You must be logged in to reply to this topic.