Yes! But maybe no! Be careful!
If you run pm-updatecode on any code in a given Drupal site, it is necessary to run updatedb afterwards in order to make the database schema(s) match the current schema in code. So, while drush -l mysite1.com
will in fact correctly run pm-updatecode
followed by updatedb
on mysite1, if you have any modules in sites/all/modules that is updated, or if Drupal core is updated, then you will also need to run updatedb on every other site in the multisite install. If you skip this step, then mysite1 will work, but you might break the other sites in the multisite install.
When dealing with a multisite installation, the safest policy is:
- Copy live to dev
- Run pm-updatecode on every site in the multisite on dev
- Run updatedb on every site in the multisite on dev
- Test! Test! Test!
- Take all of the sites in the multisite offline on production
- Push your updated code from all multisites on dev to production
- Run updatedb on every site in the multisite on production
- Test again!
- Bring all of the sites back online
You can avoid doing all sites at once if you know that all of your updated modules are in sites/mysite1/modules, and Drupal core is not updated. In general, though, it is better to avoid multisite installs so that you do not need to worry about the interdependence of the shared code on multiple databases.