Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db_ignore_data_tables seem not to impact the dump #78

Open
andreydeineko opened this issue Nov 2, 2015 · 6 comments
Open

db_ignore_data_tables seem not to impact the dump #78

andreydeineko opened this issue Nov 2, 2015 · 6 comments

Comments

@andreydeineko
Copy link

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.

@numbata
Copy link
Collaborator

numbata commented Nov 2, 2015

Do you use mysql or postgresql?

@andreydeineko
Copy link
Author

@numbata I am using MySQL

@numbata
Copy link
Collaborator

numbata commented Nov 2, 2015

@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

@andreydeineko
Copy link
Author

@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?

@numbata
Copy link
Collaborator

numbata commented Nov 2, 2015

@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.

@Jesus
Copy link

Jesus commented May 27, 2016

Looks like this was fixed on 9e8e760, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants