Search code examples
phppostgresqlyiiyii-extensionsrights

yii users and rights extension install on postgresql


I have installed users and rights extension of Yii framework and It is working properly.
I want to migrate to postgresql. The rights extension has mysql and sqlite import files (schema.mysql.sql and schema.sqlite.sql files), but It has not postgresql import file. How can I create rights and users tables in my postgresql db?
should I create the tables by hand?


Solution

  • I created the tables by hand and It worked properly, but I needed to exchange some code under protected/modules/rights/components/RDbAuthManager.php.
    I replaced these fields in the sql queries in RDbAuthManager class:

    $itemTable = $this->db->quoteTableName($this->itemTable);
    $rightsTable = $this->db->quoteTableName($this->rightsTable);
    $assignmentTable = $this->db->quoteTableName($this->assignmentTable);
    $itemChildTable = $this->db->quoteTableName($this->itemChildTable);