Issuing drush site-upgrade --core-only @example.d7 fails with

using drush version 5.0-dev gives

error: no database record could be found for @self

while drush version 4.5-dev runs partly as expected (reloading the db) but then fails with

Command site-upgrade-prepare needs a higher bootstrap level to run - you will need invoke drush from a more functional Drupal environment to run this command.                                                                  [error]
The drush command 'site-upgrade-prepare content content_copy fieldgroup filefield imagefield nodereference optionwidgets text imageapi imageapi_gd graphstat pathauto token googleanalytics' could not be executed.             [error]

Visiting update.php works fine.
- drush @example.d7 sql-drop
- drush site-upgrade --core-only @example.d7
- visit example.d7/update.php

It keeps me away from drush site-ugrade unfortunately :-(

Comments

sun’s picture

Can't reproduce the OP with 5.x, but 5.x fails at a later point for me:

Drupal site already exists at [...]/dev7.  Would you like to:
 [0]  :  Cancel
 [1]  :  Delete the existing site and start over.
 [2]  :  Re-use the existing code, re-import the database from the source site and run updatedb again.

1
Install location [...]/dev7 already exists. Do you want to overwrite it? (y/n):
y
Project drupal (7.4) downloaded to [...]/dev7.                         [success]

Project drupal contains:                                                                                       [success]

 - 3 profiles: testing, standard, minimal
 - 4 themes: stark, seven, garland, bartik
 - 47 modules: [...]

You will destroy data from drupal7 and replace with data from drupal6.

You might want to make a backup first, using the sql-dump command.

Do you really want to continue? (y/n): y
Table 'drupal7.access' doesn't exist                                                 [warning]

query: SELECT 1 FROM access WHERE type = 'host' AND LOWER('127.0.0.1') LIKE LOWER(mask)
AND status = 0 LIMIT 0, 1 database.mysqli.inc:134
Table 'drupal7.cache' doesn't exist                                                  [warning]

query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'variables'
database.mysqli.inc:134
Table 'drupal7.variable' doesn't exist                                               [warning]

query: SELECT * FROM variable database.mysqli.inc:134
Table 'drupal7.cache' doesn't exist                                                  [warning]

query: UPDATE cache SET data = '', created = 1311533255, expire = 0, headers = '',
serialized = 0 WHERE cid = 'variables' database.mysqli.inc:134
Table 'drupal7.system' doesn't exist                                                 [warning]

query: SELECT name, filename, throttle FROM system WHERE type = 'module' AND status = 1 AND
bootstrap = 1 ORDER BY weight ASC, filename ASC database.mysqli.inc:134
Table 'drupal7.url_alias' doesn't exist                                              [warning]

query: SELECT COUNT(pid) FROM url_alias database.mysqli.inc:134
Drush command terminated abnormally due to an unrecoverable error.                                               [error]

Error: Call to undefined function filter_xss() in [...]\dev\includes\common.inc, line 655

Fatal error: Call to undefined function filter_xss() in [...]\dev\includes\common.inc on line 655

Call Stack:
    0.0006     383448   1. {main}() [...]\scripts\drush\drush.php:0
    0.7415    2940168   2. drush_main() [...]\scripts\drush\drush.php:14
    1.2866    6345376   3. drush_bootstrap_to_phase() [...]\scripts\drush\drush.php:70
    1.3808    8430232   4. drush_bootstrap() [...]\scripts\drush\includes\bootstrap.inc:305
    1.3809    8430944   5. _drush_bootstrap_drupal_full() [...]\scripts\drush\includes\bootstrap.inc:189
    1.3809    8471984   6. drupal_bootstrap() [...]\scripts\drush\includes\bootstrap.inc:835
    1.3922    8682800   7. _drupal_bootstrap() [...]\dev\includes\bootstrap.inc:1109
    1.3924    8682800   8. _drupal_bootstrap_full() [...]\dev\includes\bootstrap.inc:1202
    1.4258   11211616   9. module_load_all() [...]\dev\includes\common.inc:2673
    1.4258   11211680  10. module_list() [...]\dev\includes\module.inc:12
    1.4258   11211904  11. db_query() [...]\dev\includes\module.inc:63
    1.4259   11212296  12. _db_query() [...]\dev\includes\database.mysql-common.inc:41
    1.4263   11213248  13. trigger_error() [...]\dev\includes\database.mysqli.inc:134
    1.4263   11214360  14. drupal_error_handler() [...]\dev\includes\common.inc:134

Observations:

- it seems to attempt to bootstrap the old D6 site somehow with the new/empty database (not sure how that is actually possible...?)

- the D7 database is still empty.

- settings.php in the fresh D7 site contains a D6 style $db_url string appended to the end, which contains the new/D7 db credentials (probably intended to be replaced by Drupal core upgrade)

moshe weitzman’s picture

Status: Active » Postponed (maintainer needs more info)

1. It does do that. It can do so because the new DB has not been upgraded. In other words, it is still a D6 database and we are merely running on a copy of the real source DB.

2. The new DB should not be empty if the sql-sync succeeds. It seems like yours failed, but without a --verbose log I can't be sure.

3. Correct about D7 upgrade appending $databases.

guysaban’s picture

error: no database record could be found for @self

For the above error we cleared the .drush/cache and it got past the error.

I am not sure that would help with your issue.

greg.1.anderson’s picture

Version: » 8.x-6.x-dev
Status: Postponed (maintainer needs more info) » Closed (won't fix)
Issue tags: +Needs migration

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