{"id":23,"date":"2010-11-13T13:48:57","date_gmt":"2010-11-13T05:48:57","guid":{"rendered":"http:\/\/blog.nami.idv.tw\/?p=23"},"modified":"2016-04-19T15:44:37","modified_gmt":"2016-04-19T07:44:37","slug":"wb-synchronize-model-issue","status":"publish","type":"post","link":"https:\/\/blog.nami.idv.tw\/?p=23","title":{"rendered":"WB : Synchronize Model issue"},"content":{"rendered":"<p>\u4e4b\u524d\u7576\u9032\u884c Databses\/Synchronize Model \u7684\u6642\u5019\u8001\u662f\u767c\u751f\u660e\u660e EER, live DB \u5169\u908a\u4e00\u6a23\u7684 schema \u537b\u7522\u751f\u9700\u8981\u7570\u52d5\u7684 script\uff0c\u4eca\u5929\uff0c\u7d42\u65bc\u767c\u73fe\u554f\u984c\u6240\u5728\u4e86\uff01\u30fd(\uff40\u25b3\u00b4)\/<\/p>\n<p>MySQL Workbench \u5728\u9032\u884c\u5169\u908a\u6bd4\u5c0d\u7684\u6642\u5019\u662f\u63a1\u53d6 <strong>case sensitive<br \/>\n<\/strong>\u6a21\u5f0f\uff0c\u5728 live DB \u662f unix like OS \u7684\u60c5\u5f62\u4e0b\u9019\u61c9\u8a72\u662f\u4e0d\u6703\u51fa\u554f\u984c\u7684\uff0c\u4f46\u662f\uff01\u7576 live DB \u662f Windows \u7684\u6642\u5019\u5c31\u6158\u4e86\uff0c\u4f8b\u5982\uff1aDiagram \u6709\u4e00\u500b view \u53eb\u505a <strong>vw_ProductListWithThumbnail<\/strong>\uff0cForward Engineer \u5230\u4e86 live DB on Windows \u4e4b\u5f8c\u5c31\u6703\u8b8a\u6210 <strong>vw_productlistwiththumbnail<\/strong>\uff0c\u9019\u6a23\u4e00\u6bd4\u5c0d\u4e4b\u5f8c\u7d50\u679c\u7576\u7136\u4e0d\u4e00\u6a23\u4e86... =_=<\/p>\n<p>Reference:<br \/>\n<a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.1\/en\/identifier-case-sensitivity.html\" target=\"_blank\">http:\/\/dev.mysql.com\/doc\/refman\/5.1\/en\/identifier-case-sensitivity.html<\/a><\/p>\n<p>\u91dd\u5c0d\u9019\u500b\u554f\u984c Google \u4e00\u4e0b\u76f8\u95dc\u7684\u6587\u7ae0\u767c\u73fe\u4ee5\u4e0b\u6587\u7ae0\u63d0\u5230\u8a31\u591a MySQL \u904b\u4f5c\u5728 Windows \u5e73\u53f0\u4e0a\u7684\u554f\u984c\uff1a<br \/>\n<a rel=\"bookmark\" href=\"http:\/\/www.webyog.com\/blog\/2009\/07\/23\/does-mysql-care-about-windows-users\/\"> Does MySQL care about Windows users?<\/a><\/p>\n<p>\u6240\u4ee5\uff0c\u5c31\u7b97\u5728 my.ini \u88e1\u8a2d\u5b9a <strong>lower_case_table_names = 2<\/strong>\uff0c\u7576\u4f7f\u7528\u8005 CREATE \u7684\u662f view \u7684\u6642\u5019\uff0cCREATE 'ViEw' \u7d50\u679c\u9084\u662f\u6703\u8b8a\u6210 'view'\uff1b\u7576\u4f7f\u7528 mysqldump \u4f5c backup \u7684\u6642\u5019\u66f4\u6158\uff0c\u6240\u6709 table name, view name \u4e00\u6a23\u5168\u90e8\u8b8a\u6210\u5c0f\u5beb\uff0c\u800c\u4e14\u9019\u500b\u554f\u984c\u5728 bugs \u88e1\u653e\u4e86\u4e09\u5e74\u6709\u4e86! (\u30ce \u309c\u0414\u309c)\u30ce == \u253b\u2501\u253b<\/p>\n<p>\u82e5\u662f\u5728 Windows \u5e73\u53f0\u4e0a\u5f37\u5236\u5c07 <strong>lower_case_table_names = 0<\/strong>\uff0c\u53ef\u80fd\u6703\u6536\u5230\u4ee5\u4e0b\u8b66\u544a\uff1a<\/p>\n<blockquote><p>[Warning] You have forced lower_case_table_names to 0 through a  command-line option, even though your file system  '\/mysql\/data\/' is case insensitive.  This means that you  can corrupt a MyISAM table by accessing it with different cases. You  should consider changing lower_case_table_names to 1 or 2<\/p><\/blockquote>\n<p>\u6240\u4ee5\u7576\u958b\u767c\u8005\u6703\u5728\u4e0d\u540c\u5e73\u53f0\u4e0a\u4f7f\u7528 MySQL \u7684\u72c0\u6cc1\u4e0b\uff0c\u9019\u6703\u662f\u500b\u5f88\u56b4\u91cd\u7684\u554f\u984c\uff0c\u4e0d\u5f97\u4e0d\u6ce8\u610f\u3002<\/p>\n<p>\u88dc\u8a18\uff1a<br \/>\n[2010\/11\/14]<br \/>\n\u4ee5 Server version: 5.1.47-community MySQL Community Server (GPL) on Windows XP \u7684\u74b0\u5883\u4e0b\u6e2c\u8a66 <strong>lower_case_table_names = 2<\/strong> \u7684\u5f71\u97ff\uff0c\u6e2c\u8a66\u7d50\u679c\u70ba\uff1a<\/p>\n<ul>\n<li>\u5efa\u7acb\u7684 DATABASE\u3001TABLE \u7684\u78ba\u4fdd\u7559\u4e86\u539f\u59cb\u7684\u5927\u5c0f\u5beb\uff0c\u5728\u6a94\u6848\u7cfb\u7d71\u4e2d\u4e5f\u662f<\/li>\n<li>\u5efa\u7acb\u7684 VIEW \u5168\u90e8\u8b8a\u6210\u5c0f\u5beb\uff0c\u5728\u6a94\u6848\u7cfb\u7d71\u4e2d\u4e5f\u662f<\/li>\n<li>mysqldump \u7684\u7d50\u679c\uff0cCREATE DATABASE \u88e1\u7684\u540d\u7a31\u8b8a\u6210\u5168\u90e8\u5c0f\u5beb\uff0c\u4f46\u662f USE \u8ddf CREATE TABLE \u662f\u6b63\u78ba\u7684\uff0cCREATE VIEW \u88e1\u7684\u540d\u7a31\u5168\u90e8\u8b8a\u6210\u5c0f\u5beb\u3002<\/li>\n<\/ul>\n<p>\u7d50\u8ad6\uff1a<\/p>\n<ul>\n<li>\u8cc7\u6599\u5eab\u7684\u540d\u7a31\u4ee5\u5168\u5c0f\u5beb\u5efa\u7acb\u5373\u53ef<\/li>\n<li>VIEW \u5c31\u5f88\u8f9b\u82e6\u4e86\uff0c\u4e0d\u80fd\u7528\u500b vw_GetDataFromT1andT2 \u4e4b\u985e\u7684\uff0c\u5f97\u7528 vw_Get_Data_From_T1_and_T2<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u7576\u9032\u884c Databses\/Synchronize Model \u7684\u6642\u5019\u8001\u662f\u767c\u751f &hellip; <a href=\"https:\/\/blog.nami.idv.tw\/?p=23\">\u95b1\u8b80\u5168\u6587 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[17],"tags":[3],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-troubleshooting","tag-mysql"],"_links":{"self":[{"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23"}],"version-history":[{"count":14,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":184,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions\/184"}],"wp:attachment":[{"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}