I am working on a Yii app that requires the 'users' table to have a column 'token' that will need to be a unique random string that is based upon that user in the table (eg there will never be the same token twice).
Can anyone give me some tips on doing this, or are there a Yii component/extension/generator already setup to do this.
Also - what is the most optimised db column type for this?