capistrano-db-tasks
capistrano-db-tasks copied to clipboard
db_ignore_data_tables seem not to impact the dump
I tried using the db_ignore_data_tables
option as follows (in config/deploy.rb
):
set :db_ignore_data_tables, [:versions]
But it still downloads the whole versions
table with data.
Where am I wrong? Stack: Rails 4.2.4, capistrano 3.0.0, capistrano-db-tasks 0.4.
Do you use mysql or postgresql?
@numbata I am using MySQL
@andreydeineko unfortunately, this option works only with postgresql now. https://github.com/sgruhier/capistrano-db-tasks/blob/master/lib/capistrano-db-tasks/database.rb#L97
@numbata This is really unfortunate. Thanks for info!
Is it because making it available for MySQL is a problem or there is another reason this option does not work with MySQL?
@andreydeineko it is impossible for MySQL to do this in one dump command (like in PostgreSQL).
we should do something like:
mysqldump --ignore-table=db_name.table_name db_name && mysqldump --no-data db_name table_name
. I don't know how to do this with current cap-db-tasks code easily.
Looks like this was fixed on 9e8e760afe2ee377b6be9ba1d4da90930f958253, the problem must be that you're using version 0.4 of capistrano-db-tasks.
But that's the latest version, @sgruhier would it be a good idea to publish 0.5 ?
UPDATE: Sorry, the commit I mentioned doesn't affect db_ignore_data_tables
but db_ignore_tables
. So this isn't fixed on master either.