-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some fixes I made #22
Conversation
Script was hugely rewritten. First rebase your patches. |
I know essentially 0 about git - I installed it to check this out so don't know exactly how to do that. I will give it a shot but more than likely I will fail utterly. |
I remerged those changes. should be able to pull them now... |
NB: I've merged Jeff's changes into my master @ https://github.com/tardate/mysql2postgres |
Thanks! |
Max - just checked and these changes are all in master and the released gem so you could close this pull request |
I cannot see when these commits would have landed... @tardate are you able to point them out? |
Closing as an old pull request, that would seem to be out of date. |
I made 3 bug fixes to mysql2postgres - fix handling floats (the current code would turn them into numeric(random#,0) where random# would be the most recent precision or length encountered in processing the schema, the second fix is to properly initialize length (I used -1 because an error on schema creation to guessing with the possible risk of truncating data).
The final change was to emit a warning when an COPY fails, I found that because of corrupted dates (things like 0000-12-00) there were errors in the copy - the code would happily and silently drop that chunk on insert. I changed the code to check count from res.cmdtuples and print a warning when it failed.
I tested this but only on mysql 5.1 and pg 9.0. the float fix is for bug 21 I booked.