core icon indicating copy to clipboard operation
core copied to clipboard

upgrading 4.5.2 to 4.5.5: Failed to get existing database structure for upgrading, relation \"archive\" does not exist

Open zmi1 opened this issue 13 years ago • 17 comments

Just upgrading the webpage, and the site shows: Error while upgrading the database

in data/owncloud.log I find this:

{"app":"core","message":"Failed to get existing database structure for upgrading (MDB2 Error: no such table, _doQuery: [Error message: Could not execute statement]\n[Last executed query: SELECT * FROM "archive" LIMIT 1 OFFSET 0]\n[Native message: ERROR: relation "archive" does not exist\nLINE 1: SELECT * FROM "archive" LIMIT 1 OFFSET 0\n ^]\n)","level":4,"time":1356622875}

So why doesn't it create that relation? How should I create it manually?

This is a PostgreSQL database, but that shouldn't matter too much, right?

zmi1 avatar Dec 27 '12 15:12 zmi1

Can you please double check the web server errorlog? Which apps are enabled?

DeepDiver1975 avatar Dec 27 '12 15:12 DeepDiver1975

apache error log: nothing.

owncloud config says: 'dbtype' => 'pgsql', 'version' => '4.90.3',

There are no apps despite "Files" I believe. When I go back (untar the old owncloud files) I can login and on the left there's only "Dateien" (which means files).

zmi1 avatar Dec 28 '12 10:12 zmi1

Any more ideas?

zmi1 avatar Dec 31 '12 16:12 zmi1

Just happened to me, too. Same exact s***, except that I'm using MySQL. From what I read from the support forums is that this is a common upgrade error and no one came up with a solution.

Is there a seperate SQL file for manual upgrade of the database structure??

JensS avatar Jan 02 '13 10:01 JensS

ok, what I found on the Facebook page is:

"ownCloud: Hi Helmut, it would be nice to have more information on this. However, the most common problem is that the collation of the tables (and columns) is utf8. ownCloud needs latin1, otherwise mysql can not create the indexes. Does this information help you? Regards, your ownCloud team 29. Februar 2012 um 13:18"

strange, that the installer didn't create the tables using latin1. and when I look into "db_structure.xml", it does create some tables with utf8.

however, after changing the encoding the error persists

JensS avatar Jan 02 '13 11:01 JensS

All tables and fields should be utf-8! I don't know who has given that horrific advice :-P

It could be that you have some tables that are not utf-8 which that gives the problem. But I no little about databases and even less about Postgres.

tanghus avatar Jan 02 '13 11:01 tanghus

https://www.facebook.com/owncloud/posts/10150598978461359?comment_id=21877398 <- thats the source

JensS avatar Jan 02 '13 11:01 JensS

Didn't even know there was an ownCloud fb account ;)

tanghus avatar Jan 02 '13 12:01 tanghus

So there's an owncloud fb page that gives advices that are negated here. What's wrong? The whole owncloud thingy should have version 0.9alpha1, there are so many problems... even a simple minor update (as here from 4.5.2 to 4.5.5) makes it stop working... that's totally inacceptable. We'd like to sell this, but in the current ALPHA state the customers would kill us: we still have NO solution to get it working again. 6days offline now :-(

zmi1 avatar Jan 02 '13 13:01 zmi1

@zmi1 please get in touch with owncloud.com They offer professional services and priority support. And btw we are all still on vacation mode - stay calm and happy new year! @fkarlitschek do you want to take care of this? Thanks

DeepDiver1975 avatar Jan 02 '13 14:01 DeepDiver1975

@JensS This advice was written on February 29 2012. It's probably good for ownCloud 3.x

VicDeo avatar Jan 02 '13 15:01 VicDeo

Ok, I've got it working now.

I made an SQL backup and a clean install of the most recent release. With the functioning SQL structure I removed the data from the new install and recovered the data from the backup. A backup without the sql structure in short. ;)

JensS avatar Jan 02 '13 16:01 JensS

@DeepDiver1975 We're currently in testing phase, and want to see if we can offer this to our customers. But if we can't even update a minor release 4.5.2 to 4.5.5 without needing support, I won't even think about paying for support. This is stuff that simply must work.

I will try to install a clean 4.5.5 as @JensS said. Too sad there's no other, simple and correct solution.

zmi1 avatar Jan 07 '13 07:01 zmi1

ok, seriously!? the same error happened during the upgrade from 4.5.5 to 4.5.6.

JensS avatar Jan 26 '13 14:01 JensS

Same thing happened to me, I upgraded from 4.5.5 to 4.5.6 to have some bugs smashed but ended up with this bug, now. How to troubleshoot this some more?

Failed to update database structure (MDB2 Error: unknown error, _doQuery: [Error message: Could not execute statement] [Last executed query: ALTER TABLE `oc_groups` ADD PRIMARY KEY (`gid`)] [Native code: 1068] [Native message: Multiple primary key defined] )

Edit: It seems to have only happened once. Can other users whom have had this bother them let us know if: it also has only happened only once, or persists?

anti-pencil avatar Jan 29 '13 23:01 anti-pencil

See #999

radoeka avatar Feb 10 '13 19:02 radoeka

I’m closing this bug because it has been inactive for a few months. This probably means it’s not reproducible or it has been fixed in a newer version.

Please reopen if the error still persists with ownCloud 5.0.9 (the latest stable version) and then please use the issue template. You an also contribute directly by providing a patch – see the developer manual. :)

Thank you!

jancborchardt avatar Aug 05 '13 12:08 jancborchardt