“pg_dump: invalid option — i” when migrating

后端 未结 5 971
闹比i
闹比i 2021-01-11 10:01

When I run rake db:migrate on my Rails project (3.2.22.2) I get pg_dump: invalid option -- i. Here\'s the full trace:

Celluloid 0.1         


        
5条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-11 10:15

    Unlikely there is a fix as it's not a security issue. Even if it was, I'm not sure they are patching 3.x anymore.

    The problem is in the db:structure:dump task here:

    https://github.com/rails/rails/blob/v3.2.22.2/activerecord/lib/active_record/railties/databases.rake#L428

    Easiest thing is to copy that task (413 - 448) and put it into your own lib/tasks directory, wrap a namespace db around it, tweak the pg_dump command (remove -i) and your task should override the built in task.

提交回复
热议问题