DB issues are still existing
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
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
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
Thanx and I made myself a Deck ticket ;-)
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?
Uninstalling, deleting all remaining leftovers from the DB and reinstalling latest version solves the problem.
Use the following commands to clean up the database:
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.
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.
Solved by https://github.com/nextcloud/maps/issues/649#issuecomment-1005919873