Skip to content
New issue

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

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

Already on GitHub? # to your account

[Bug] PostgreSQL: Not null violation #1578

Open
segln opened this issue Dec 16, 2024 · 0 comments
Open

[Bug] PostgreSQL: Not null violation #1578

segln opened this issue Dec 16, 2024 · 0 comments

Comments

@segln
Copy link

segln commented Dec 16, 2024

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

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

No branches or pull requests

1 participant