You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Database error when migrating from 6.0 to 6.0.1 #6915
Operating system: Windows
Web server: not sure (hostet at 1und1.de)
Database: MySQL 5
PHP version: 5.4
ownCloud version: before 6.0, now 6.0.1 (even so error occured)
Updated from an older ownCloud or fresh install: Update
List of activated app: Activities, Bookmarks, Calendar, Contacts, Deleted Files, Documents, External storage support, First Run Wizard, Full Text Search, PDF Viewer, Pictures, Share Files, Tasks, Text Editor, Updater, Versions
The content of config/config.php:
'ocfb7711e93b',
'passwordsalt' => '',
'datadirectory' => '/homepages/3/d173767322/htdocs/owncloud/data',
'dbtype' => 'mysql',
'version' => '6.0.0.15',
'dbname' => 'db355930358',
'dbhost' => 'db3021.1und1.de',
'dbtableprefix' => 'oc_',
'dbuser' => 'dbo355930358',
'dbpassword' => '',
'installed' => true,
'theme' => '',
'maintenance' => false,
'loglevel' => '2',
);
Are you using external storage, if yes which one: none
### Client configuration
Browser: Google Chrome 32.0.1700.76 m
Operating system:Windows 7 (64 bit)
### Logs
#### Web server error log
n/a
#### ownCloud log (data/owncloud.log)
{"app":"core","message":"Failed to update database structure (exception 'Doctrine\DBAL\DBALException' with message 'Unknown database type enum requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.' in \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Platforms\/AbstractPlatform.php:321\nStack trace:\n#0 \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Schema\/MySqlSchemaManager.php(112): Doctrine\DBAL\Platforms\AbstractPlatform->getDoctrineTypeMapping('enum')\n#1 \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Schema\/AbstractSchemaManager.php(672): Doctrine\DBAL\Schema\MySqlSchemaManager->_getPortableTableColumnDefinition(Array)\n#2 \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Schema\/AbstractSchemaManager.php(159): Doctrine\DBAL\Schema\AbstractSchemaManager->_getPortableTableColumnList('apple_wiki_comm...', 'db355930358', Array)\n#3 \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Schema\/AbstractSchemaManager.php(254): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableColumns('apple_wiki_comm...')\n#4 \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Schema\/AbstractSchemaManager.php(242): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableDetails('apple_wiki_comm...')\n#5 \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Schema\/AbstractSchemaManager.php(831): Doctrine\DBAL\Schema\AbstractSchemaManager->listTables()\n#6 \/homepages\/3\/d173767322\/htdocs\/owncloud\/lib\/private\/db\/mdb2schemamanager.php(60): Doctrine\DBAL\Schema\AbstractSchemaManager->createSchema()\n#7 \/homepages\/3\/d173767322\/htdocs\/owncloud\/lib\/private\/db.php(376): OC\DB\MDB2SchemaManager->updateDbFromStructure('\/homepages\/3\/d1...')\n#8 \/homepages\/3\/d173767322\/htdocs\/owncloud\/lib\/private\/updater.php(106): OC_DB::updateDbFromStructure('\/homepages\/3\/d1...')\n#9 \/homepages\/3\/d173767322\/htdocs\/owncloud\/core\/ajax\/update.php(34): OC\Updater->upgrade()\n#10 {main})","level":4,"time":"2014-01-23T14:14:51+00:00"}
#### Browser log
n/a
I tried grepping the code and couldn't find it, neither in the source code nor in the packaged OC 6.0.1.
@Mittlebenskrise can you double check that you don't have any 3rd party app running before the upgrade ? I didn't see any mentionned in the list above but the log seems to imply that it might be the case.
Hi, well there are other tables in the database as well that are not OC tables. I assume that a list of all tables in the database is collected in listTables and then passed on to listTableDetails. And maybe there lies the problem. Shouldn't OC ignore all tables that are not its own? I.e. all tables with a name not starting with the "dbtableprefix" from the config file?
OK, I got it to work by changing the function listTables in 3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php. The changes might not be the perfect way to implement this, but I assume you guys can get that fix in in a better way. I marked the modified lines with comments.
public function listTables()
{
$tableprefix = Config::getSystemValue( "dbtableprefix", "" ); // NEW
$tableNames = $this->listTableNames();
$tables = array();
foreach ($tableNames as $tableName) {
if( substr( $tableName, 0, strlen( $tableprefix )) == $tableprefix ) { // NEW
$tables[] = $this->listTableDetails($tableName);
} // NEW
}
return $tables;
}
Now only those tables are added to the list that have the OC prefix, not other tables from other web applications. No clue if that might cause other side effects, but it seems to work.
The documentation says that we should upgrade from 5 to 6 to 7 by first upgrading to 5.0.18, then to 6.0.6 and then to 7.0.4.
Trying to upgrade from 5.0.18 to 6.0.6 resulted in the error described above. I too had to change the file 3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php but got the error that the Config object was not available, so I had to write like this:
publicfunctionlistTables()
{
$tableprefix = "oc_"; // NEW / look up what you configured for tableprefix in your config.php$tableNames = $this->listTableNames();
$tables = array();
foreach ($tableNamesas$tableName) {
if( substr( $tableName, 0, strlen( $tableprefix )) == $tableprefix ) { // NEW$tables[] = $this->listTableDetails($tableName);
} // NEW
}
return$tables;
}
After this was done, I was able to upgrade from 6.0.6 to 7.0.4.
Activity
DeepDiver1975 commentedon Jan 23, 2014
@Mittlebenskrise Thanks a lot for reporting issues back to us!
We need some more information to properly support you with your issue!
Can I ask you to follow our guidelines for submitting bugs as described here: https://github.com/owncloud/core/blob/master/CONTRIBUTING.md
Thanks a lot!
Mittlebenskrise commentedon Jan 23, 2014
Ups, sorry. Here's the information
Server configuration
Operating system: Windows
'ocfb7711e93b', 'passwordsalt' => '', 'datadirectory' => '/homepages/3/d173767322/htdocs/owncloud/data', 'dbtype' => 'mysql', 'version' => '6.0.0.15', 'dbname' => 'db355930358', 'dbhost' => 'db3021.1und1.de', 'dbtableprefix' => 'oc_', 'dbuser' => 'dbo355930358', 'dbpassword' => '', 'installed' => true, 'theme' => '', 'maintenance' => false, 'loglevel' => '2', ); Are you using external storage, if yes which one: none ### Client configuration Browser: Google Chrome 32.0.1700.76 m Operating system:Windows 7 (64 bit) ### Logs #### Web server error log n/a #### ownCloud log (data/owncloud.log) {"app":"core","message":"Failed to update database structure (exception 'Doctrine\DBAL\DBALException' with message 'Unknown database type enum requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.' in \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Platforms\/AbstractPlatform.php:321\nStack trace:\n#0 \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Schema\/MySqlSchemaManager.php(112): Doctrine\DBAL\Platforms\AbstractPlatform->getDoctrineTypeMapping('enum')\n#1 \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Schema\/AbstractSchemaManager.php(672): Doctrine\DBAL\Schema\MySqlSchemaManager->_getPortableTableColumnDefinition(Array)\n#2 \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Schema\/AbstractSchemaManager.php(159): Doctrine\DBAL\Schema\AbstractSchemaManager->_getPortableTableColumnList('apple_wiki_comm...', 'db355930358', Array)\n#3 \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Schema\/AbstractSchemaManager.php(254): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableColumns('apple_wiki_comm...')\n#4 \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Schema\/AbstractSchemaManager.php(242): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableDetails('apple_wiki_comm...')\n#5 \/homepages\/3\/d173767322\/htdocs\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Schema\/AbstractSchemaManager.php(831): Doctrine\DBAL\Schema\AbstractSchemaManager->listTables()\n#6 \/homepages\/3\/d173767322\/htdocs\/owncloud\/lib\/private\/db\/mdb2schemamanager.php(60): Doctrine\DBAL\Schema\AbstractSchemaManager->createSchema()\n#7 \/homepages\/3\/d173767322\/htdocs\/owncloud\/lib\/private\/db.php(376): OC\DB\MDB2SchemaManager->updateDbFromStructure('\/homepages\/3\/d1...')\n#8 \/homepages\/3\/d173767322\/htdocs\/owncloud\/lib\/private\/updater.php(106): OC_DB::updateDbFromStructure('\/homepages\/3\/d1...')\n#9 \/homepages\/3\/d173767322\/htdocs\/owncloud\/core\/ajax\/update.php(34): OC\Updater->upgrade()\n#10 {main})","level":4,"time":"2014-01-23T14:14:51+00:00"} #### Browser log n/aWeb server: not sure (hostet at 1und1.de)
Database: MySQL 5
PHP version: 5.4
ownCloud version: before 6.0, now 6.0.1 (even so error occured)
Updated from an older ownCloud or fresh install: Update
List of activated app: Activities, Bookmarks, Calendar, Contacts, Deleted Files, Documents, External storage support, First Run Wizard, Full Text Search, PDF Viewer, Pictures, Share Files, Tasks, Text Editor, Updater, Versions
The content of config/config.php:
PVince81 commentedon Jan 23, 2014
Table
apple_wiki_comm...what could that be ?I tried grepping the code and couldn't find it, neither in the source code nor in the packaged OC 6.0.1.
@Mittlebenskrise can you double check that you don't have any 3rd party app running before the upgrade ? I didn't see any mentionned in the list above but the log seems to imply that it might be the case.
Mittlebenskrise commentedon Jan 24, 2014
Hi, well there are other tables in the database as well that are not OC tables. I assume that a list of all tables in the database is collected in listTables and then passed on to listTableDetails. And maybe there lies the problem. Shouldn't OC ignore all tables that are not its own? I.e. all tables with a name not starting with the "dbtableprefix" from the config file?
Mittlebenskrise commentedon Jan 24, 2014
OK, I got it to work by changing the function listTables in 3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php. The changes might not be the perfect way to implement this, but I assume you guys can get that fix in in a better way. I marked the modified lines with comments.
Now only those tables are added to the list that have the OC prefix, not other tables from other web applications. No clue if that might cause other side effects, but it seems to work.
DeepDiver1975 commentedon Jan 24, 2014
Yes it should ignore them - we had a similar issue in the past.
@VicDeo you fixed that - right? Can you please double check once more? THX
VicDeo commentedon Jan 24, 2014
@DeepDiver1975 It was in times of MDB2. The code I changed was refactored in stable6/master
cc @bartv2
Doctrine MySqlPlatform can't enum type
PVince81 commentedon May 6, 2014
@VicDeo @bartv2 any update ? (for the table listing issue)
DeepDiver1975 commentedon Jul 24, 2014
will be fixed with 7.0.1
as4565683 commentedon Feb 5, 2015
The documentation says that we should upgrade from 5 to 6 to 7 by first upgrading to 5.0.18, then to 6.0.6 and then to 7.0.4.
Trying to upgrade from 5.0.18 to 6.0.6 resulted in the error described above. I too had to change the file 3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php but got the error that the Config object was not available, so I had to write like this:
After this was done, I was able to upgrade from 6.0.6 to 7.0.4.