maps icon indicating copy to clipboard operation
maps copied to clipboard

DB issues are still existing

Open cue108 opened this issue 4 years ago • 6 comments

Steps: Install the latest Maps Version on the latest Nextcloud server and got to settings->logging and enjoy the following error message appearing every 5 minutes: An exception occurred while executing a query: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_maps_photos" does not exist LINE 1: INSERT INTO "oc_maps_photos"("file_id","user_id","date_taken... ^

System: Nextcloud Version: 22.1.1 Maps Version: 0.1.9 Database : pgsql PostgreSQL 13.2 (Debian 13.2-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit 41.8 MB

cue108 avatar Sep 18 '21 22:09 cue108

Can confirm, that it is still not working. I even removed the app completely and reinstalled it in case the install routine is responsible for creating tables.

Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_maps_photos' doesn't exist

Nextcloud Version: 21.0.4.1 Maps Version: 0.1.9 Webserver: nginx/1.14.2 (behind nginx reverse proxy) with php-fpm 7.3.29 DB: mysql 10.3.29

cmasdf avatar Sep 25 '21 12:09 cmasdf

Uninstalling, deleting all remaining leftovers from the DB and reinstalling latest version solves the problem.

Use the following commands to clean up the database:

https://github.com/nextcloud/maps/issues/566#issuecomment-799447131 https://github.com/nextcloud/maps/pull/568#issuecomment-803649323

cmasdf avatar Jan 05 '22 17:01 cmasdf

Thanx and I made myself a Deck ticket ;-)

cue108 avatar Jan 05 '22 17:01 cue108

So, if I understand properly the solution is written in #568 but it wasn't installed? Maps on disable does not remove tables and/or on enable doesn't check existence of tables? Why is that?

grinapo avatar Feb 10 '22 11:02 grinapo

Uninstalling, deleting all remaining leftovers from the DB and reinstalling latest version solves the problem.

Use the following commands to clean up the database:

#566 (comment) #568 (comment)

Thanx, and it did the job. I meanwhile have Nextcloud 23.0.2 with the latest Map running and could do a fresh install thanx to your reference to SQL cleanup statements.

cue108 avatar Feb 21 '22 15:02 cue108

So, if I understand properly the solution is written in #568 but it wasn't installed? Maps on disable does not remove tables and/or on enable doesn't check existence of tables? Why is that?

The solutions is to perform the sql statements mentioned in the referenced comments. Looks to me like any of the prior updates did not migrate the db properly/completely which led to leftovers preventing the installer to create the correct tables on reinstall - but thats just a best guess, i did not check the code. The referenced sql commands delete these leftovers, so that the installer can create the necessary tables from scratch with the latest format.

cmasdf avatar Feb 21 '22 17:02 cmasdf

Solved by https://github.com/nextcloud/maps/issues/649#issuecomment-1005919873

tacruc avatar Mar 03 '23 23:03 tacruc