Revision 10237
Added by Aaron Marcuse-Kubitza over 11 years ago
my2pg | ||
---|---|---|
20 | 20 |
-e 's/ double/ double precision/g' \ |
21 | 21 |
-e 's/ (integer|bigint|bytea|double precision|float|text)(\([^)]*\))?( unsigned)?/ \1/g' \ |
22 | 22 |
-e 's/ (char)\(0\)/ \1/g' \ |
23 |
-e 's/ datetime/ timestamp/g' \
|
|
23 |
-e 's! (date|datetime|time|timestamp)! text/*\1*/!g' \
|
|
24 | 24 |
-e 's/ ("[^"]*") enum(\([^()]*\))/ \1 text CHECK (\1 in \2)/g' \ |
25 | 25 |
-e "s/ set\('([^()]*)'\)/ \1/g" \ |
26 | 26 |
"$@"\ |
Also available in: Unified diff
bin/my2pg*: keep MySQL indefinite dates as text strings instead of translating them (to the first of the month or year) to fit into a PostgreSQL timestamp. this allows the application to decide how to handle these values, which otherwise have no corresponding value in PostgreSQL. this requires changing the date/time related types to text instead of leaving them as-is, so that they can store the custom MySQL strings.