Revision 7541
Added by Aaron Marcuse-Kubitza almost 12 years ago
bin/my2pg | ||
---|---|---|
11 | 11 |
echo 'SET standard_conforming_strings = off;' |
12 | 12 |
echo 'SET escape_string_warning = off;' |
13 | 13 |
sed \ |
14 |
-e 's/ UNIQUE KEY ("[^"]*")/ CONSTRAINT \1 UNIQUE/g' \
|
|
14 |
-e 's/ UNIQUE KEY ("[^"]*")/ \/*CONSTRAINT \1 *\/UNIQUE/g' \
|
|
15 | 15 |
-e 's/ UNIQUE KEY/ UNIQUE/g' \ |
16 | 16 |
-e 's/^ ((CONSTRAINT "[^"]*" )?((FULLTEXT|FOREIGN) )?KEY .*[^,])(,?)$/ \/*\1*\/CHECK (true)\5/' \ |
17 | 17 |
-e "s/\/\*.* (SET NAMES )([0-9A-Za-z_]+) \*\/;/\1'\2';/" \ |
Also available in: Unified diff
my2pg: named UNIQUE KEYs: Comment out the name because PostgreSQL requires it to be globally unique, but MySQL only requires it to be unique within the table