Menu

#1 Siremis not working with Postgresql

open
nobody
None
5
2014-09-05
2012-05-04
Anonymous
No

Siremis installation fails on a Postgresql database.
* SQL querys are for Mysql.
If you install siremis on Mysql and try to use an already created kamailio DDBB.
* Openbiz does not play nice with Postgresql. [1]

[1] https://groups.google.com/d/topic/openbiz-cubi/4KdlKRQ9-ng/discussion

Discussion

  • Daniel-Constantin Mierla

    Added the patch sent to mailing list

     
  • Daniel-Constantin Mierla

    The patch for openbiz component for pg:

    openbiz/bin/data/BizDataSql.php~ openbiz/bin/data/BizDataSql.php
    --- openbiz/bin/data/BizDataSql.php~ 2010-09-15 15:09:29.000000000 +0200
    +++ openbiz/bin/data/BizDataSql.php 2012-04-16 10:23:38.000000000 +0200
    @@ -46,7 +46,7 @@
    public function addMainTable($mainTable)
    {
    $this->_mainTable = "$mainTable";
    - $this->_tableJoins = " `$mainTable` T0 ";
    + $this->_tableJoins = " $mainTable T0 ";
    }

    /**
    @@ -74,7 +74,7 @@
    $this->_joinAliasList[$tableJoin->m_Name] = $alias;
    $this->_tableAliasList[$table] = $alias;
    $aliasRef = $this->getJoinAlias($joinRef);
    - $this->_tableJoins .= " $joinType `$table` $alias ON
    $alias.$column = $aliasRef.$columnRef ";
    + $this->_tableJoins .= " $joinType $table $alias ON
    $alias.$column = $aliasRef.$columnRef ";
    }

    /**
    @@ -245,7 +245,7 @@
    //if (strpos($this->m_TableJoins, "JOIN $xtable") === false)
    if (!isset($this->_tableAliasList[$xtable]))
    {
    - $this->_tableJoins .= " INNER JOIN `$xtable` $xalias
    ON $xalias.$column2 = $mytable_col ";
    + $this->_tableJoins .= " INNER JOIN $xtable $xalias ON
    $xalias.$column2 = $mytable_col ";
    $this->_tableAliasList[$xtable] = $xalias;
    }
    // add a new where condition

     
  • Anonymous

    Anonymous - 2012-07-18

    I've created a patch to openbiz in order to dealing with backticks on MySQL vs PostGreSQL. Already sent to openbiz for review [0]

    I've adapted it for the version included in siremis 3.2.0. Attached to this bug.

    [0] http://code.google.com/p/openbiz-cubi/issues/detail?id=25#c2

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.