20th Mon
mysqlのDBをpostgresに移行する方法のメモ
ActiveRecordを使っている場合、
YamlDb
を使うと比較的簡単にデータの移行ができるようです。
script/consoleあたりから、
ruby>>
YamlDb.dump "/path/to/data.yml" # dump
YamlDb.load "/path/to/data.yml" # load
<<--
という感じに使えます。structureは作ってくれないので、migrationなどであらかじめ用意しておきます。
posted by
genki on Mon 20 Jun 2011 at 16:04 with 0 comments