Warren Seltzer
2006-Apr-29 20:42 UTC
[Rails] nuby migration question -- data migration, MySQL => postgresql
How do I best migrate the data? For small databases I can text-edit the dump file from MySQL. The postgresql compatibility switch doesn''t help on mysqldump. Any ideas. Can MySQL export CSV that postgresql can import ? W Fred -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060429/dad4546b/attachment-0001.html
Robby Russell
2006-Apr-30 01:53 UTC
[Rails] nuby migration question -- data migration, MySQL => postgresql
On Apr 29, 2006, at 1:42 PM, Warren Seltzer wrote:> How do I best migrate the data? For small databases I can text- > edit the dump file from MySQL. The postgresql compatibility switch > doesn''t help on mysqldump. Any ideas. Can MySQL export CSV that > postgresql can import ? >Yes, PostgreSQL can import a CSV. :-) I''ve also worked on a rake task in the past that would talk to a MySQL db (Rails app) and then after I generate the PostgreSQL db with the same schema (with the different field types)... I would just run rake mysql2pgsql and it''d go through a yaml -> model -> save process. It worked pretty well on a few projects. Email me off list and I''ll see what I can dig up this week for you. -Robby Robby Russell Founder & Executive Director PLANET ARGON, LLC Ruby on Rails Development, Consulting & Hosting www.planetargon.com www.robbyonrails.com +1 503 445 2457 +1 877 55 ARGON [toll free] +1 815 642 4968 [fax]
Robby Russell
2006-Apr-30 01:57 UTC
[Rails] nuby migration question -- data migration, MySQL => postgresql
On Apr 29, 2006, at 6:53 PM, Robby Russell wrote:> > On Apr 29, 2006, at 1:42 PM, Warren Seltzer wrote: > >> How do I best migrate the data? For small databases I can text- >> edit the dump file from MySQL. The postgresql compatibility >> switch doesn''t help on mysqldump. Any ideas. Can MySQL export >> CSV that postgresql can import ? >> > > Yes, PostgreSQL can import a CSV. :-) > > I''ve also worked on a rake task in the past that would talk to a > MySQL db (Rails app) and then after I generate the PostgreSQL db > with the same schema (with the different field types)... I would > just run rake mysql2pgsql and it''d go through a yaml -> model -> > save process. It worked pretty well on a few projects. > > Email me off list and I''ll see what I can dig up this week for you.Also, there is this project: http://gborg.postgresql.org/project/mysql2psql/projdisplay.php Cheers, Robby Robby Russell Founder & Executive Director PLANET ARGON, LLC Ruby on Rails Development, Consulting & Hosting www.planetargon.com www.robbyonrails.com +1 503 445 2457 +1 877 55 ARGON [toll free] +1 815 642 4968 [fax]