-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Improve mysqldump #23301
Improve mysqldump #23301
Conversation
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @sgrif (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
For reference previous discussion about this: #8004 |
Thanks for your reference! |
Thank you, I'll try to do this to avoid |
r? @arthurnn |
So 👀 this issue. |
Are |
I think if you skip-comments you dont need to @jeremy I see skip-comments on 5.5 https://dev.mysql.com/doc/refman/5.5/en/mysqldump.html#option_mysqldump_dump-date and maria https://mariadb.com/kb/en/mariadb/mysqldump/ |
@arthurnn Thanks for your review. |
ありがとうございます |
Am I understanding correctly that rails 5.1 will no longer include the |
Rails merged [this PR](rails/rails#23301) to run mysqldump with `--skip-comments`.
@jaredbeck Late reply but maybe this is useful to others. But as far as I can tell, this change doesn't actually get rid of the autoincrement but it does get rid of other bits of useless info / merge conflict sources. Seems like the best way to remove this is one of the regex replace scripts floating around as mysqldump doesn't seem to have any setting to remove it. |
After we running
rake db:structure:dump
in project members each other, there might havediff
ondb/structure.sql
as below.Because default output of
mysqldump
includes comments like MySQL version and AUTO_INCREMENT default value and so on.In addition, after we running
rake db:migrate
when we setconfig.active_record.schema_format=:sql
inconfing/application.rb
, there might have differentdb/structure.sql
as below.So, I added additional options to "mysqldump" command and I removed
AUTO_INCREMENT
default values from dumped SQL.