Revision 7537
Added by Aaron Marcuse-Kubitza almost 12 years ago
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 "([^"]*)" \([^)]*\)/ "\3_index" boolean/' \
|
|
14 |
-e 's/^ ((UNIQUE|FULLTEXT) )?KEY "([^"]*)" \([^)]*\)/ CHECK (true) \/* element removed *\//' \
|
|
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
my2pg*: Replacing invalid table elements to remove them: Use a dummy CHECK constraint instead of a boolean field to avoid adding fields to the table. The elements can't always simply be removed because sed can't remove the trailing comma of the previous element, and removing the following comma doesn't work for the last element in the table.