Revision 10448
Added by Aaron Marcuse-Kubitza over 11 years ago
my2pg | ||
---|---|---|
15 | 15 |
|
16 | 16 |
sed \ |
17 | 17 |
-e 's/`/"/g' \ |
18 |
-e 's/ UNIQUE KEY ("[^"]*")/ \/*CONSTRAINT \1 *\/UNIQUE/g' \
|
|
18 |
-e 's! UNIQUE KEY ("[^"]*")! /*CONSTRAINT \1 */UNIQUE!g' \
|
|
19 | 19 |
-e 's/ UNIQUE KEY/ UNIQUE/g' \ |
20 |
-e 's/^ ((CONSTRAINT "[^"]*" )?((FULLTEXT|FOREIGN) )?KEY .*[^,])(,?)$/ \/*\1*\/CHECK (true)\5/' \
|
|
21 |
-e "s/\/\*.* (SET NAMES )([0-9A-Za-z_]+) \*\/;/\1'\2';/" \
|
|
20 |
-e 's!^ ((CONSTRAINT "[^"]*" )?((FULLTEXT|FOREIGN) )?KEY .*[^,])(,?)$! /*\1*/CHECK (true)\5!' \
|
|
21 |
-e "s!/\*.* (SET NAMES )([0-9A-Za-z_]+) \*/;!\1'\2';!" \
|
|
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" \ |
Also available in: Unified diff
bin/my2pg: use s!...!...! when either the regexp or the replacement contains / , to avoid unnecessary \-s