Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The fix is easy; catch the exception and ignore it. All unit tests still pass with this modification, and this also allows sql-sync to work when the target database exists and is empty.
If no one has any issues with this, I will commit it.
Comment | File | Size | Author |
---|---|---|---|
#2 | drush-if-database-is-empty-1996004-2.patch | 1.53 KB | greg.1.anderson |
drush-catch-bootstrap-configuration-exceptions.patch | 741 bytes | greg.1.anderson |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedI'm hesitant to add this so late in the cycle. If it were local to a command, I might go for it. maybe we do this right after 7.x opens?
Comment #2
greg.1.anderson CreditAttribution: greg.1.anderson commentedHere is a fix for sql-conf only. This will still allow sql-sync to work after an sql-drop. Unit tests are running right now; I expect they will all pass.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedThis looks fine, pending green tests
Comment #4
greg.1.anderson CreditAttribution: greg.1.anderson commentedAll green; committed.
Setting to 'postponed' to reconsider #0 in Drush-8.x-7.x.
Comment #5
greg.1.anderson CreditAttribution: greg.1.anderson commentedWhat do you think about putting this into 7.x-5.x-dev? The situation is quite annoying to get out of, as you can't use Drush on the target, and you can't sql-sync over the target. The workaround is to delete the db completely and then use --create-db, or copy your database configuration into your alias record. :(
Comment #6
moshe weitzman CreditAttribution: moshe weitzman commentedseems ok to backport
Comment #7
greg.1.anderson CreditAttribution: greg.1.anderson commentedAll tests passed, so committed to 7.x-5.x. Back to 'postponed' until 8.x-7.x.
Comment #8
greg.1.anderson CreditAttribution: greg.1.anderson commentedThis issue was marked
closed (won't fix)
because Drush has moved to Github.If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to
closed (duplicate)
.Please ask support questions on Drupal Answers.