owncloud-archive / maps

:globe_with_meridians: Maps app for ownCloud
GNU Affero General Public License v3.0
42 stars 20 forks source link

Support the other ownCloud databases except MySQL as well #31

Closed schtobia closed 8 years ago

schtobia commented 9 years ago

While trying to activate the maps app on my OwnCloud instance, I got the following error: An exception occurred while executing 'CREATE TABLE "oc_maps_locations" ("id" BIGSERIAL DEFAULT NULL, "device_hash" VARCHAR(64) DEFAULT NULL, "lat" VARCHAR(64) DEFAULT NULL, "lng" VARCHAR(64) DEFAULT NULL, "timestamp" VARCHAR(64) DEFAULT NULL, "hdop" VARCHAR(64) DEFAULT NULL, "altitude" VARCHAR(64) DEFAULT NULL, "speed" VARCHAR(64) DEFAULT NULL)': SQLSTATE[42601]: Syntax error: 7 FEHLER: mehrere Vorgabewerte angegeben für Spalte »id« von Tabelle »oc_maps_locations«

Syslog: Oct 28 17:56:22 schmidl ownCloud[15097]: {core} Invalid OCS content returned for app maps Oct 28 17:56:22 schmidl postgres[15121]: [2-1] 2014-10-28 17:56:22 CET FEHLER: mehrere Vorgabewerte angegeben für Spalte »id« von Tabelle »oc_maps_locations« Oct 28 17:56:22 schmidl postgres[15121]: [2-2] 2014-10-28 17:56:22 CET ANWEISUNG: CREATE TABLE "oc_maps_locations" ("id" BIGSERIAL DEFAULT NULL, "device_hash" VARCHAR(64) DEFAULT NULL, "lat" VARCHAR(64) DEFAULT NULL, "lng" VARCHAR(64) DEFAULT NULL, "timestamp" VARCHAR(64) DEFAULT NULL, "hdop" VARCHAR(64) DEFAULT NULL, "altitude" VARCHAR(64) DEFAULT NULL, "speed" VARCHAR(64) DEFAULT NULL) Oct 28 17:56:22 schmidl ownCloud[15097]: {core} An exception occurred while executing 'CREATE TABLE "oc_maps_locations" ("id" BIGSERIAL DEFAULT NULL, "device_hash" VARCHAR(64) DEFAULT NULL, "lat" VARCHAR(64) DEFAULT NULL, "lng" VARCHAR(64) DEFAULT NULL, "timestamp" VARCHAR(64) DEFAULT NULL, "hdop" VARCHAR(64) DEFAULT NULL, "altitude" VARCHAR(64) DEFAULT NULL, "speed" VARCHAR(64) DEFAULT NULL)':#012#012SQLSTATE[42601]: Syntax error: 7 FEHLER: mehrere Vorgabewerte angegeben für Spalte »id« von Tabelle »oc_maps_locations«

I'm operating on the stable_7 from OwnCloud.

brantje commented 9 years ago

Only mysql is currently supported

jancborchardt commented 9 years ago

@brantje it would be quite important that Maps supports all the databases which ownCloud supports, like MySQL, SQLite, PostgreSQL.

jancborchardt commented 9 years ago

Does someone want to pick this up @v1t0x @Henni @DJaeger @brantje?

jancborchardt commented 9 years ago

@v1r0x I mean :)

v1r0x commented 9 years ago

I'm a MySQL guy and have nothing to test, sorry

DJaeger commented 9 years ago

Me too. But I would try to solve this when I have some time to create a dev instance for this.

jancborchardt commented 9 years ago

Installing and testing with SQLite is quite easy. :)

jancborchardt commented 8 years ago

@DeepDiver1975 @icewind1991 @brantje do you know what is necessary for this?

icewind1991 commented 8 years ago

From what I can tell the reported problem is caused by the database definition, when a field is set auto increment (maps_locations.id)it should not have a default set and you don't need to define an index for it.

v1r0x commented 8 years ago

So removing the <default>0</default> line in the database.xml should fix this?