5 min read

Table 'DATEBASE_NAME.AuthAssignment' doesn't exist

Table 'DATEBASE_NAME.AuthAssignment' doesn't exist

Last modified

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',
    ),