Project

General

Profile

« Previous | Next » 

Revision 7538

my2pg*: Remove FOREIGN KEYs because MySQL does not dump tables in dependency order, which prevents PostgreSQL from creating tables whose fkeys refer to a later table

View differences:

my2pg
11 11
echo 'SET standard_conforming_strings = off;'
12 12
echo 'SET escape_string_warning = off;'
13 13
sed \
14
-e 's/^  ((UNIQUE|FULLTEXT) )?KEY "([^"]*)" \([^)]*\)/  CHECK (true) \/* element removed *\//' \
14
-e 's/^  (CONSTRAINT "[^"]*" )?((UNIQUE|FULLTEXT|FOREIGN) )?KEY .*[^,](,?)$/  CHECK (true) \/* element removed *\/\4/' \
15 15
-e "s/\/\*.* (SET NAMES )([0-9A-Za-z_]+) \*\/;/\1'\2';/" \
16 16
-e 's/ (CHARACTER SET|COLLATE) [0-9A-Za-z_]+//g' \
17 17
-e "s/ COMMENT '[^']*'//g" \

Also available in: Unified diff