moving some schema detail detection to yii