Table ‘DATEBASE_NAME.AuthAssignment’ doesn’t exist

If you have used Rights module for RBAC in your Yii application and you deploy it on Linux based server, you may encounter this error.

AuthAssignment doesn't exist

Problem:
If you have used Rights module for RBAC in your Yii application and you deploy it on Linux based server, you may encounter this error.

Table ‘DATEBASE_NAME.AuthAssignment’ doesn’t exist

Cause of the problem:

This is because your tables names are in lowercase but in code they are being referred with different capitalization, Linux is case sensitive so it treats authassignment and AuthAssignment differently.

Solution:

In your root/protected/config/main.php specify exactly the same table names as they appear in your database.

'components'=>array(
    'authManager'=>array(
            'defaultRoles'=>array('guest'),
            'class'=>'RDbAuthManager',
            'assignmentTable'=>'authassignment',
            'itemTable'=>'authitem',
            'rightsTable'=>'rights',
            'itemChildTable'=>'authitemchild',
    ),

Author: Tahir Yasin

Tahir is a Passionate Web Developer from Lahore, Pakistan and a guy with NEVER-STOP-LEARNING attitude who keeps an eye on emerging technologies and customer trends.

2 thoughts on “Table ‘DATEBASE_NAME.AuthAssignment’ doesn’t exist”

Leave a Reply to Faxriddin Cancel reply

Your email address will not be published. Required fields are marked *