4.0.x doesn't work on Postgresql
When I choose a folder no file is showing up, in the Nextcloud log I got this (only partial)
{"reqId":"xUBiAtasIA0mDVYRtBSK","level":3,"time":"July 26, 2019 19:17:01","remoteAddr":"192.168.1.114","user":"kaistian","app":"index","method":"POST","url":"\/owncloud\/index.php\/apps\/gpxpod\/getmarkers","message":{"Exception":"Doctrine\\DBAL\\Exception\\InvalidFieldNameException","Message":"An exception occurred while executing '
SELECT path, lat, lon, dateTaken
FROM oc_gpxpod_pictures
WHERE \"user\"='kaistian'
AND lat IS NOT NULL
AND lon IS NOT NULL
AND path LIKE '\/gpx\/sykkel%'; ':
SQLSTATE[42703]: Undefined column: 7 ERROR: column \"datetaken\" does not exist
LINE 2: SELECT path, lat, lon, dateTaken
^
HINT: Perhaps you meant to reference the column \"oc_gpxpod_pictures.dateTaken\".","Code":0,"Trace":[{"file":"\/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php","line":184,"function":"convertException","class":"Doctrine\\DBAL\\Driver\\AbstractPostgreSQLDriver","type":"->","args":["An exception occurred while executing '
SELECT path, lat, lon, dateTaken
FROM oc_gpxpod_pictures
WHERE \"user\"='kaistian'
AND lat IS NOT NULL
AND lon IS NOT NULL
AND path LIKE '\/gpx\/sykkel%'; ':
SQLSTATE[42703]: Undefined column: 7 ERROR: column \"datetaken\" does not exist
LINE 2: SELECT path, lat, lon, dateTaken
A describe of the table
# \d oc_gpxpod_pictures
Table "public.oc_gpxpod_pictures"
Column | Type | Collation | Nullable | Default
-------------+------------------------+-----------+----------+------------------------------------------------
id | integer | | not null | nextval('oc_gpxpod_pictures_id_seq'::regclass)
user | character varying(64) | | not null |
path | character varying(300) | | not null |
contenthash | character varying(300) | | not null | ''::character varying
lat | double precision | | |
lon | double precision | | |
dateTaken | bigint | | |
Indexes:
"oc_gpxpod_pictures_pkey" PRIMARY KEY, btree (id)
In Postgres uppercase letter is converted to lowercase unless the column name is quoted.
Without quotes:
# SELECT path, lat, lon, dateTaken FROM oc_gpxpod_pictures;
ERROR: column "datetaken" does not exist
LINE 1: SELECT path, lat, lon, dateTaken FROM oc_gpxpod_pictures;
With single or double quotes it works:
# SELECT path, lat, lon, 'dateTaken' FROM oc_gpxpod_pictures;
path | lat | lon | ?column?
------+-----+-----+----------
(0 rows)
# SELECT path, lat, lon, "dateTaken" FROM oc_gpxpod_pictures;
path | lat | lon | dateTaken
------+-----+-----+-----------
(0 rows)