[Pkg-owncloud-maintainers] Bug#757549: owncloud: DB-Errors on Migration 6.0.3 to 7.0.0

Tom Fernandes anyaddress at gmx.net
Sat Aug 9 06:12:11 UTC 2014


Package: owncloud
Version: 7.0.0+dfsg-2~bpo70+2
Severity: normal

Dear Maintainer,

I upgraded OC from 6.0.3+dfsg-2~bpo70+1 to 7.0.0+dfsg-2~bpo70+2 and then
went to my OC-website. I was prompted for clicking to run the update,
which I did. Then it said there was an error and that I should report
this to the community.

The postgres-log says:
ERROR:  relation "oc_share_external" already exists
STATEMENT:  CREATE TABLE "oc_share_external" ("id" SERIAL NOT NULL,
"remote" VARCHAR(512) NOT NULL, "share_token" VARCHAR(64) NOT NULL,
"password" VARCHAR(64) NOT NULL, "name" VARCHAR(64) NOT NULL, "owner"
VARCHAR(64) NOT NULL, "user" VARCHAR(64) NOT NULL, "mountpoint"
VARCHAR(4000) NOT NULL, "mountpoint_hash" VARCHAR(32) NOT NULL, PRIMARY
KEY("id"))

The OC-log reports:
ailed to update database structure (exception 'PDOException' with
message 'SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation
"oc_share_external" already exists' in
/usr/share/php/Doctrine/DBAL/Connection.php:801 Stack trace: #0
/usr/share/php/Doctrine/DBAL/Connection.php(801): PDO->query('CREATE
TABLE "o...') #1 /usr/share/owncloud/lib/private/db/migrator.php(179):
Doctrine\DBAL\Connection->query('CREATE TABLE "o...') #2
/usr/share/owncloud/lib/private/db/migrator.php(35):
OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema)) #3
/usr/share/owncloud/lib/private/db/mdb2schemamanager.php(98):
OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema)) #4
/usr/share/owncloud/lib/private/db.php(320):
OC\DB\MDB2SchemaManager->updateDbFromStructure('/usr/share/ownc...') #5
/usr/share/owncloud/lib/private/app.php(1172):
OC_DB::updateDbFromStructure('/usr/share/ownc...') #6
/usr/share/owncloud/lib/private/app.php(980):
OC_App::updateApp('files_sharing') #7
/usr/share/owncloud/lib/private/app.php(87):
OC_App::checkUpgrade('files_sharing') #8
/usr/share/owncloud/lib/private/app.php(72):
OC_App::loadApp('files_sharing') #9
/usr/share/owncloud/lib/private/updater.php(222): OC_App::loadApps() #10
/usr/share/owncloud/lib/private/updater.php(137):
OC\Updater->doUpgrade('7.0.0.8', '6.0.3.1') #11
/usr/share/owncloud/core/ajax/update.php(35): OC\Updater->upgrade() #12
{main} Next exception 'Doctrine\DBAL\DBALException' with message 'An
exception occurred while executing 'CREATE TABLE "oc_share_external"
("id" SERIAL NOT NULL, "remote" VARCHAR(512) NOT NULL, "share_token"
VARCHAR(64) NOT NULL, "password" VARCHAR(64) NOT NULL, "name"
VARCHAR(64) NOT NULL, "owner" VARCHAR(64) NOT NULL, "user" VARCHAR(64)
NOT NULL, "mountpoint" VARCHAR(4000) NOT NULL, "mountpoint_hash"
VARCHAR(32) NOT NULL, PRIMARY KEY("id"))': SQLSTATE[42P07]: Duplicate
table: 7 ERROR: relation "oc_share_external" already exists' in
/usr/share/php/Doctrine/DBAL/DBALException.php:91 Stack trace: #0
/usr/share/php/Doctrine/DBAL/Connection.php(811):
Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(PDOException),
'CREATE TABLE "o...') #1
/usr/share/owncloud/lib/private/db/migrator.php(179):
Doctrine\DBAL\Connection->query('CREATE TABLE "o...') #2
/usr/share/owncloud/lib/private/db/migrator.php(35):
OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema)) #3
/usr/share/owncloud/lib/private/db/mdb2schemamanager.php(98):
OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema)) #4
/usr/share/owncloud/lib/private/db.php(320):
OC\DB\MDB2SchemaManager->updateDbFromStructure('/usr/share/ownc...') #5
/usr/share/owncloud/lib/private/app.php(1172):
OC_DB::updateDbFromStructure('/usr/share/ownc...') #6
/usr/share/owncloud/lib/private/app.php(980):
OC_App::updateApp('files_sharing') #7
/usr/share/owncloud/lib/private/app.php(87):
OC_App::checkUpgrade('files_sharing') #8
/usr/share/owncloud/lib/private/app.php(72):
OC_App::loadApp('files_sharing') #9
/usr/share/owncloud/lib/private/updater.php(222): OC_App::loadApps() #10
/usr/share/owncloud/lib/private/updater.php(137):
OC\Updater->doUpgrade('7.0.0.8', '6.0.3.1') #11
/usr/share/owncloud/core/ajax/update.php(35): OC\Updater->upgrade() #12
{main}) 


My OC-instance seems to work fine, but I feel uneasy if the DB-migration
executed fine in the end.
I did not find a way to re-run the upgrade or to verify the status of
the system.

Is there a way to check if the upgrade/migration worked correctly?

Warm regards and thanks for the good work,


Tom

-- System Information:
Debian Release: 7.6
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages owncloud depends on:
ii  fonts-font-awesome       3.2.1~dfsg-2~bpo7+1
ii  fonts-liberation         1.07.2-6
ii  fonts-linuxlibertine     5.1.3-1
ii  fonts-lohit-deva         2.5.1-1
ii  fonts-sil-gentium-basic  1.1-5
ii  fonts-wqy-microhei       0.2.0-beta-2~bpo70+1
ii  libjs-chosen             0.9.11-1~bpo7+1
ii  libjs-dojo-dojox         1.7.2+dfsg-1
ii  libjs-jcrop              0.9.12+dfsg-1~bpo70+1
ii  libjs-jquery-minicolors  1.2.1-1~bpo7+1
ii  libjs-jquery-mousewheel  6-1
ii  libjs-jquery-timepicker  1.2-1~bpo70+1
ii  libjs-pdf                1.0.473+dfsg-1~bpo70+1
ii  libphp-phpmailer         5.1-1
ii  nginx-extras [httpd]     1.6.0-1~bpo70+1
ii  owncloud-doc             0~20140428-1~bpo70+1
ii  php-assetic              1.1.2-1~bpo70+1
ii  php-doctrine-dbal        2.4.2-3~bpo70+1
ii  php-getid3               1.9.7-2~bpo70+1
ii  php-opencloud            1.10.0-2
ii  php-patchwork-utf8       1.1.7-1~bpo70+1
ii  php-pear                 5.4.4-14+deb7u12
ii  php-pimple               1.1.1-1~bpo70+1
ii  php-sabre-dav            1.8.10-1~bpo70+1
ii  php-seclib               0.3.5-2~bpo70+1
ii  php-symfony-classloader  2.3.6-1~bpo70+1
ii  php-symfony-console      2.3.1+dfsg-1~bpo70+1
ii  php-symfony-routing      2.0.19-1~bpo70+1
ii  php5                     5.4.4-14+deb7u12
ii  php5-common [php5-json]  5.4.4-14+deb7u12
ii  php5-gd                  5.4.4-14+deb7u12
ii  php5-pgsql               5.4.4-14+deb7u12
ii  zendframework            1.11.13-1.1

Versions of packages owncloud recommends:
ii  libav-tools                     6:10.1-1~bpo70+1
ii  libreoffice                     1:4.2.5-1~bpo70+1
ii  php-aws-sdk                     2.6.0-1~bpo70+1
ii  php-crypt-blowfish              1.1.0~RC2-3~bpo70+1
ii  php-dropbox                     1.0.0-1~bpo70+1
ii  php-google-api-php-client       0.6.2-1~bpo70+1
ii  php5-cli                        5.4.4-14+deb7u12
ii  php5-curl                       5.4.4-14+deb7u12
ii  php5-imagick                    3.1.0~rc1-1+b2
ii  php5-intl                       5.4.4-14+deb7u12
ii  php5-ldap                       5.4.4-14+deb7u12
ii  php5-mcrypt                     5.4.4-14+deb7u12
ii  php5-xcache                     2.0.0-4
ii  postfix [mail-transport-agent]  2.9.6-2
ii  smbclient                       2:4.1.9+dfsg-1~bpo70+1

Versions of packages owncloud suggests:
pn  libapache2-mod-xsendfile  <none>
ii  postgresql                9.1+134wheezy4

-- Configuration Files:
/etc/owncloud/htaccess [Errno 13] Permission denied: u'/etc/owncloud/htaccess'

-- no debconf information



More information about the Pkg-owncloud-maintainers mailing list