Skip to content

Commit

Permalink
Fixed: #21
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammaye committed Aug 6, 2014
1 parent 107e837 commit 10e84e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/AuditTrail.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function tableName()
if ( isset(Yii::app()->params['AuditTrail']) && isset(Yii::app()->params['AuditTrail']['table']) )
return Yii::app()->params['AuditTrail']['table'];
else
return 'tbl_audit_trail';
return '{{%audit_trail}}';
}

/**
Expand Down

5 comments on commit 10e84e2

@danielbehrendt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, i think that's wrong too. It must be:

return '{{audit_trail}}';

and not

return '{{%audit_trail}}';

or am I wrong?

@Sammaye
Copy link
Owner Author

@Sammaye Sammaye commented on 10e84e2 Aug 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The % should relate to the table prefix, does it not work?

@danielbehrendt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it does not work. the correct syntax for prefixed table names is {{table_name}}

http://www.yiiframework.com/doc/guide/1.1/en/database.dao#using-table-prefix

@Sammaye
Copy link
Owner Author

@Sammaye Sammaye commented on 10e84e2 Aug 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take a look into this when I got a free moment, probably tomorrow.

@Sammaye
Copy link
Owner Author

@Sammaye Sammaye commented on 10e84e2 Aug 9, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, sorry about that

Please sign in to comment.