Trying to do migration of D6 to Drupal 8.7.2.
There are no table prefixes in source database.
SELECT schema_version FROM `system` where name='system'
gives me "6056" value.

But still when I press "Review Upgrade" button there is "Source database does not contain a recognizable Drupal version" error message.

Please help.

CommentFileSizeAuthor
#6 issue-3057305.patch768 bytesneffets

Comments

f1mishutka created an issue. See original summary.

sunil.yadav’s picture

I was having same issue. Please check if you have any table prefix then you need to add in "ADVANCED OPTIONS" there is a option "Table name prefix" .

f1mishutka’s picture

Hi sunil.yadav,

As I noticed in issue description, I have no table prefixes.

Version: 8.7.2 » 8.7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

quietone’s picture

Status: Active » Closed (cannot reproduce)

@f1mishutka, Thanks for reporting this issue.

I have tested this on 8.7.x and 9.1.x and am unable to reproduce the problem. I used a source database with a system schema of '6056'.

MariaDB [d6_dump]> SELECT schema_version FROM `system` where name='system';
+----------------+
| schema_version |
+----------------+
|           6056 |
+----------------+
1 row in set (0.000 sec)

Since I can' reproduce this issue on the Drupal version it was reported against or the latest version, I'm marking the issue "Closed (cannot reproduce)". If anyone can provide complete steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active".

Thanks!

neffets’s picture

StatusFileSize
new768 bytes

Problem occurs again.
Migration from 7.84 to 8.9.20

Mysql is an mysql/mysql-server:8.0

Problem occurs with check of LegacyVersion its trying to access in the d7 database:
> SELECT schema_version FROM system where name='system';

Mysql Error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'system where name='system'

There are missing the backticks "`" around the tablename "system" because system is a reserved word in Mysql-8

Fix for migration was in web/core/lib/Drupal/Core/Database/Connection.php

# diff -Nur web/core/lib/Drupal/Core/Database/Connection.php web/core/lib/Drupal/Core/Database/Connection.php.new 
--- web/core/lib/Drupal/Core/Database/Connection.php	2022-01-01 21:14:23.406990150 +0000
+++ web/core/lib/Drupal/Core/Database/Connection.php.new	2021-12-30 23:15:52.316692460 +0000
@@ -313,9 +313,9 @@
     }
     // Then replace remaining tables with the default prefix.
     $this->prefixSearch[] = '{';
-    $this->prefixReplace[] = "" . $this->prefixes['default'];
+    $this->prefixReplace[] = "`" . $this->prefixes['default'];
     $this->prefixSearch[] = '}';
-    $this->prefixReplace[] = '';
+    $this->prefixReplace[] = '`';
 
     // Set up a map of prefixed => un-prefixed tables.
     foreach ($this->prefixes as $table_name => $prefix) {
neffets’s picture

Version: 8.7.x-dev » 8.9.x-dev
Status: Closed (cannot reproduce) » Active
cilefen’s picture

Status: Active » Closed (cannot reproduce)

Please verify on Drupal 9.