The owncloud 10 database cannot be converted from sqlite to pgsql.
Steps to reproduce
1. just run the command below...
Server configuration
Operating system: ubuntu 16.04
Web server: apache2
Database: sqlite / postgresql 9.5
PHP version: 7
ownCloud version (see ownCloud admin page): 10
Updated from an older ownCloud or fresh install: updated from 9.2
Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):
ownCloud configuration
{
"system": {
"instanceid": "oc17a81e552b",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"...",
"..."
],
"datadirectory": "\/var\/www\/owncloud\/data",
"dbtype": "sqlite3",
"version": "10.0.0.12",
"installed": true,
"forcessl": true,
"enable_previews": true,
"preview_libreoffice_path": "\/usr\/bin\/libreoffice",
"theme": "",
"maintenance": false,
"secret": "***REMOVED SENSITIVE VALUE***",
"loglevel": 2,
"forceSSLforSubdomains": true,
"memcache.local": "\\OC\\Memcache\\APCu",
"trashbin_retention_obligation": "auto",
"updatechecker": false,
"htaccess.RewriteBase": "\/",
"overwrite.cli.url": "https:\/\/...:52579"
}
}
this is the error that occurs
sudo -u www-data /var/www/owncloud/occ db:convert-type --clear-schema --all-apps pgsql ownclouddbuser 127.0.0.1 ownclouddb
Clearing schema in new database
Creating schema in new database
The following tables will not be converted:
oc_accounts
oc_addressbookchanges
oc_addressbooks
oc_calendarchanges
oc_calendarobjects
oc_calendars
oc_calendarsubscriptions
oc_cards
oc_cards_properties
oc_contacts_cards_properties
oc_dav_shares
oc_documents_invite
oc_documents_member
oc_documents_op
oc_documents_revisions
oc_documents_session
oc_external_applicable
oc_external_config
oc_external_mounts
oc_external_options
oc_migrations
oc_properties
oc_schedulingobjects
oc_share
Continue with the conversion (y/n)? [n] y
oc_appconfig
144/144 [============================] 100%oc_storages
10/10 [============================] 100%oc_mounts
17/17 [============================] 100%oc_mimetypes
54/54 [============================] 100%oc_filecache
chunked query, 29 chunks
28677/28677 [============================] 100%oc_group_user
5/5 [============================] 100%oc_group_admin
1/1 [============================] 100%oc_groups
2/2 [============================] 100%oc_preferences
20/20 [============================] 100%oc_jobs
0/154 [>---------------------------] 0%
[Doctrine\DBAL\Exception\InvalidFieldNameException]
An exception occurred while executing 'INSERT INTO "oc_jobs" ("id", "class", "last_run", "argument", "last_checked", "reserved_at", "execution_duration") VALUES(?,
?, ?, ?, ?, ?, ?)' with params ["2", "OCA\\Activity\\BackgroundJob\\EmailNotification", "1483350196", "null", "1483350195", "0", "-1"]:
SQLSTATE[42703]: Undefined column: 7 ERROR: column "execution_duration" of relation "oc_jobs" does not exist
LINE 1: ..._run", "argument", "last_checked", "reserved_at", "execution...
^
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[42703]: Undefined column: 7 ERROR: column "execution_duration" of relation "oc_jobs" does not exist
LINE 1: ..._run", "argument", "last_checked", "reserved_at", "execution...
^
[PDOException]
SQLSTATE[42703]: Undefined column: 7 ERROR: column "execution_duration" of relation "oc_jobs" does not exist
LINE 1: ..._run", "argument", "last_checked", "reserved_at", "execution...
^