{"action":"created","issue":{"url":"https://api.github.com/repos/drush-ops/drush/issues/842","labels_url":"https://api.github.com/repos/drush-ops/drush/issues/842/labels{/name}","comments_url":"https://api.github.com/repos/drush-ops/drush/issues/842/comments","events_url":"https://api.github.com/repos/drush-ops/drush/issues/842/events","html_url":"https://github.com/drush-ops/drush/pull/842","id":43762326,"number":842,"title":"Fix sql-sync not propagating command-specific options to sub-commands","user":{"login":"juampy72","id":108130,"avatar_url":"https://avatars.githubusercontent.com/u/108130?v=3","gravatar_id":"","url":"https://api.github.com/users/juampy72","html_url":"https://github.com/juampy72","followers_url":"https://api.github.com/users/juampy72/followers","following_url":"https://api.github.com/users/juampy72/following{/other_user}","gists_url":"https://api.github.com/users/juampy72/gists{/gist_id}","starred_url":"https://api.github.com/users/juampy72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juampy72/subscriptions","organizations_url":"https://api.github.com/users/juampy72/orgs","repos_url":"https://api.github.com/users/juampy72/repos","events_url":"https://api.github.com/users/juampy72/events{/privacy}","received_events_url":"https://api.github.com/users/juampy72/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/drush-ops/drush/labels/area-sql","name":"area-sql","color":"d4c5f9"},{"url":"https://api.github.com/repos/drush-ops/drush/labels/badcamp","name":"badcamp","color":"bfe5bf"},{"url":"https://api.github.com/repos/drush-ops/drush/labels/pri-high","name":"pri-high","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2014-09-24T13:06:55Z","updated_at":"2015-07-22T19:14:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/drush-ops/drush/pulls/842","html_url":"https://github.com/drush-ops/drush/pull/842","diff_url":"https://github.com/drush-ops/drush/pull/842.diff","patch_url":"https://github.com/drush-ops/drush/pull/842.patch"},"body":"Currently, the following example at `examples/example.aliases.drushrc.php` does not work:\r\n    \r\n    ```\r\n     #$aliases['live'] = array(\r\n     #    'parent' => '@server,@dev',\r\n     #    'uri' => 'mydrupalsite.com',\r\n     #     'target-command-specific' => array (\r\n     #       'sql-sync' => array (\r\n     #         'skip-tables-list' => 'comments',\r\n     #       ),\r\n     #     ),\r\n     #  );\r\n    ```\r\n The reason is that skip-tables-list is an option for sql-dump, not for sql-sync. The above would only work if the setting was set to the sql-dump command instead of the sql-sync command. However, this may be desired just for sql-sync so it is not a good solution. Besides, this must be frustrating developers which do not understand why tables are not ignored.\r\n\r\nWe should propagate sql-sync options to its sub-commands such as sql-dump or sql-sanitize. Perhaps on a follow up we could remove options which belong to sub-commads defined at sql-sync and instead use `allow-additional-options => ('sql-create', 'sql-dump', 'sql-sanitize')`.\r\n"},"comment":{"url":"https://api.github.com/repos/drush-ops/drush/issues/comments/123830989","html_url":"https://github.com/drush-ops/drush/pull/842#issuecomment-123830989","issue_url":"https://api.github.com/repos/drush-ops/drush/issues/842","id":123830989,"user":{"login":"weitzman","id":7740,"avatar_url":"https://avatars.githubusercontent.com/u/7740?v=3","gravatar_id":"","url":"https://api.github.com/users/weitzman","html_url":"https://github.com/weitzman","followers_url":"https://api.github.com/users/weitzman/followers","following_url":"https://api.github.com/users/weitzman/following{/other_user}","gists_url":"https://api.github.com/users/weitzman/gists{/gist_id}","starred_url":"https://api.github.com/users/weitzman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weitzman/subscriptions","organizations_url":"https://api.github.com/users/weitzman/orgs","repos_url":"https://api.github.com/users/weitzman/repos","events_url":"https://api.github.com/users/weitzman/events{/privacy}","received_events_url":"https://api.github.com/users/weitzman/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T19:14:08Z","updated_at":"2015-07-22T19:14:08Z","body":"Alternatively, what about adding more calls in drush_sql_sync_init like so:\r\n\r\n```\r\ndrush_sitealias_command_default_options($source_settings, 'source-', 'sql-dump');\r\ndrush_sitealias_command_default_options($source_settings, 'source-', 'sql-create');\r\ndrush_sitealias_command_default_options($target_settings, 'target-', 'sql-query');\r\ndrush_sitealias_command_default_options($target_settings, 'target-', 'sql-sanitize');\r\n```\r\n"}}