Skip to content

Working with PostgreSQL #75

@bod29

Description

@bod29

Hi,
to make CDAV working with PostgreSQL database I have to make theses changes :

1 - The table creation script should be like this :

CREATE TABLE IF NOT EXISTS public.llx_actioncomm_cdav (
fk_object INTEGER NOT NULL,
uuidext VARCHAR(255) NOT NULL,
sourceuid VARCHAR(255) NOT NULL,
PRIMARY KEY (fk_object)
);
CREATE INDEX IF NOT EXISTS idx_llx_actioncomm_cdav_uuidext
ON public.llx_actioncomm_cdav (uuidext);

COMMENT ON TABLE public.llx_actioncomm_cdav IS 'Storage of external UUID created by external applications';

2 - Queries
Replacing single quotation marks with double quotation marks in CalDAVDolibarr.php and cdav.lib.php (see attached files)

3 - PHP error
Query failed: ERREUR: 42P01: la relation « llx_actioncomm_rowid_seq » n'existe pas
LINE 1: SELECT currval('llx_actioncomm_rowid_seq'))

The column is called 'id', not 'rowid' in llx_actioncomm

; you must pass 'id' as the second parameter.

$oid = $this->db->last_insert_id(MAIN_DB_PREFIX.'actioncomm');
Replaced by in CalDAVDolibarr.php :
$oid = $this->db->last_insert_id(MAIN_DB_PREFIX.'actioncomm','id');

Hope this will help

CalDAVDolibarr.php
cdav.lib.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions