Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maps database tables do not exist #566

Open
stickr opened this issue Mar 14, 2021 · 4 comments
Open

Maps database tables do not exist #566

stickr opened this issue Mar 14, 2021 · 4 comments

Comments

@stickr
Copy link

stickr commented Mar 14, 2021

Intalled Maps 0.1.8 through the Apps HMI, and using NC 21.0.0

Opening Maps and selecting photos, devices and tracks produces the following errors:

nextcloud (1).log

`Error index Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextclouddb.oc_maps_devices' doesn't exist   2021-03-13T20:55:17-0500
Error index Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextclouddb.oc_maps_devices' doesn't exist   2021-03-13T20:55:17-0500
Error index Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextclouddb.oc_maps_tracks' doesn't exist   2021-03-13T20:55:17-0500
Error index Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextclouddb.oc_maps_photos' doesn't exist   2021-03-13T20:55:17-0500`
@e-LUNATIC
Copy link

You must delete these 3 tables before you can install Maps again. After uninstalling Maps, there will still be entries in the database that will make a reinstall incorrect.

DELETE FROM `oc_appconfig` WHERE `oc_appconfig`.`appid` = 'maps' AND `oc_appconfig`.`configkey` = 'enabled';
DELETE FROM `oc_appconfig` WHERE `oc_appconfig`.`appid` = 'maps' AND `oc_appconfig`.`configkey` = 'installed_version';
DELETE FROM `oc_appconfig` WHERE `oc_appconfig`.`appid` = 'maps' AND `oc_appconfig`.`configkey` = 'types';

@stickr
Copy link
Author

stickr commented Mar 18, 2021

  1. Uninstalled maps from nextcloud Apps
  2. login to mysql, user nextclouddb
  3. ran above three statements
  4. installed maps from nextcloud Apps by applying the workaround annotated in The "unique" column option is not supported #541
  5. Didn't work for me, still see same errors

@roydenyates
Copy link

roydenyates commented Mar 22, 2021

Confirmed.

NC 21, maps latest.

You must delete these 3 tables before you can install Maps again. After uninstalling Maps, there will still be entries in the database that will make a reinstall incorrect.

DELETE FROM `oc_appconfig` WHERE `oc_appconfig`.`appid` = 'maps' AND `oc_appconfig`.`configkey` = 'enabled';
DELETE FROM `oc_appconfig` WHERE `oc_appconfig`.`appid` = 'maps' AND `oc_appconfig`.`configkey` = 'installed_version';
DELETE FROM `oc_appconfig` WHERE `oc_appconfig`.`appid` = 'maps' AND `oc_appconfig`.`configkey` = 'types';

Tried this, including removing anything related to previous maps install - still will not create the db tables.

See this for solution.

@stickr
Copy link
Author

stickr commented Apr 3, 2021

First disabled and removed the released Maps app using the Nextcloud interface.

Then logged into my server's mysql server and ran the commands from #568 provided by @localjo here

Then downloaded nightly build 0.1.9-8, extracting it into the ../nextcloud/apps/ directory, then chown -R www-data:www-data ./maps

The maps app should then show up in the Nextcloud interface, clicked Enable

Then ran sudo -u www-data -s /bin/bash -c "php /path/to/nextcloud/occ maps:scan-photos

It all worked correctly, nice job!

I still needed to manually clear the oc_migrations 'maps' entries manually as listed in Issue #568, so I think there's work to be done in order to clean that up for a user who previously tried to install the current released version of the maps app.

I did try to install the nightly 0.1.9-8 build before manually deleting the tables/oc_migrations entries and it didn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants