dav icon indicating copy to clipboard operation
dav copied to clipboard

[Bug] PostgreSQL: Not null violation

Open segln opened this issue 1 year ago • 0 comments

This bug does not occur in SQLite.

Could this perhaps be because PostgreSQL enforces NOT NULL constraints more strictly and doesn't automatically assign an id?

[error] 332195#332195: *36889 FastCGI sent in stderr: "PHP message: PDOException: SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in column "id" of relation "calendarchanges" violates not-null constraint
DETAIL:  Failing row contains (null, 982b872a-a9f6-4727-a7b7-e95e5204f67a.ics, 1344, 1, 2). in /baikal/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php:1041
Stack trace:
#0 /baikal/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php(1041): PDOStatement->execute()
#1 /baikal/vendor/sabre/dav/lib/CalDAV/Backend/PDO.php(596): Sabre\CalDAV\Backend\PDO->addChange()
#2 /baikal/vendor/sabre/dav/lib/CalDAV/CalendarObject.php(103): Sabre\CalDAV\Backend\PDO->updateCalendarObject()
#3 /baikal/vendor/sabre/dav/lib/DAV/Server.php(1137): Sabre\CalDAV\CalendarObject->put()
#4 /baikal/vendor/sabre/dav/lib/DAV/CorePlugin.php(492): Sabre\DAV\Server->updateFile()
#5 /baikal/vendor/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\DAV\CorePlugin->httpPut()
#6 /baikal/vendor/sabre/dav/lib/DAV/S" while reading response header from upstream, client: 192.168.0.2, server: baikal.example.com, request: "PUT /dav.php/calendars/user/default/982b872a-a9f6-4727-a7b7-e95e5204f67a.ics HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "baikal.example.com"

Steps to reproduce:

  1. Configure PostgreSQL database
  2. Assign journal/tasks
  3. Try updating a few times

Version: sabre/baikal 0.10.1 sabre/dav 4.7.0

segln avatar Dec 16 '24 20:12 segln