Db:convert-type from sqlite to mysql throws an SQLSTATE exception


#1

Steps to reproduce
1. Install ownCloud 10.0.0.12 with sqlite database
2. set jobs to cron
3. try to migrate to mysql database:
php occ db:convert-type --all-apps mysql owncloud_db_user hostname owncloud_database

Expected behaviour
the sqlite database should be migrated to a mysql database

Actual behaviour
Exception's thrown:


[Doctrine\DBAL\Exception\InvalidFieldNameException]
An exception occurred while executing 'INSERT INTO oc_jobs (id, class, argument, last_run, last_checked, reserved_at, execution_duration) VALUES(?, ?, ?, ?, ?, ?, ?)' with params ["1",
"OCA\Files\BackgroundJob\ScanFiles", "null", "1493728202", "1493728202", "0", "0"]:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'execution_duration' in 'field list'


[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'execution_duration' in 'field list'


[PDOException]
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'execution_duration' in 'field list'

Server configuration
Operating system: Ubuntu 16.04
Web server: apache 2.4.18
Database: 10.0.29-MariaDB-0ubuntu0.16.04.1 - Ubuntu 16.04
PHP version: PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS )
ownCloud version (see ownCloud admin page): 10.0.0.12
Updated from an older ownCloud or fresh install: Upgrade via apt upgrade owncloud
Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):

ownCloud configuration

{
    "system": {
        "updatechecker": false,
        "instanceid": "ocakwrcuskui",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "\/var\/www\/owncloud\/data",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "sqlite3",
        "version": "10.0.0.12",
        "logtimezone": "UTC",
        "installed": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "mail_from_address": "owncloud",
        "mail_smtpmode": "php",
        "mail_domain": "***REMOVED SENSITIVE VALUE***"
    }
}

Integrity status for oC9+

No errors have been found.

#2

See: https://central.owncloud.org/t/db-convert-type/7391 and especially:


#3

Seems that command doesn't work at all with 10.0:


#4

I found this procedure but can't say if it is of any use. https://www.2daygeek.com/how-to-migrate-owncloud-from-sqlite-to-mysql-database/#other

I am myself toying with the idea of migrating from lite to MySQL, but am somewhat worried about the outcome.