sgruhier/capistrano-db-tasks

`db_ignore_data_tables` setting doesn't work on MySQL

Opened this issue · 0 comments

janko commented

The method that's supposed to translate this Capistrano setting into a CLI argument just returns nil for non-Postgres database 🤷🏻‍♂️

def dump_cmd_ignore_data_tables_opts
ignore_tables = @cap.fetch(:db_ignore_data_tables, [])
ignore_tables.map { |t| "--exclude-table-data=#{t}" }.join(" ") if postgresql?
end

I suppose it's because mysqldump doesn't support this option natively. However, since the Capistrano output is truncated, it's difficult to figure out the option was not applied, so it would be better to notify the developer the option was ignored.