Project

General

Profile

« Previous | Next » 

Revision 10445

bin/my2pg: comment out table options (http://dev.mysql.com/doc/refman/5.5/en/server-sql-mode.html#sqlmode_no_table_options) instead of removing them, because they include table COMMENTs, which contain important metadata such as table definitions. (note that table COMMENTs use a slightly different syntax than column COMMENTs, so the table COMMENTs will not be commented out twice.)

View differences:

my2pg
22 22
-e 's/ (CHARACTER SET|COLLATE) [0-9A-Za-z_]+//g' \
23 23
-e "s! (COMMENT '.*')! /*\1*/!g
24 24
# COMMENTs never span multiple lines because newlines are encoded as \n" \
25
-e 's!^\) (.*);$!) /*\1*/;!g' \
25 26
${sql_ascii:+-e 's/ varbinary/ text/g' }\
26 27
-e 's/ (binary|blob|varbinary)/ bytea/g' \
27 28
-e 's/ (tinytext|mediumtext|longtext)/ text/g' \

Also available in: Unified diff