table SourceMessage, field message. so first yii finds record by message and maybe by field category. but why message is not indexed field? if in table will be many records, also type TEXT not good
it’s just a variant of implementation and you can add an index to message field if you need (and if you are using storage engine which supports fulltext indexes e.g. MyISAM)
and I think that it will be OK to change type to CHAR/VARCHAR for perfomance reason, but in this case you will not be able to store messages longer than 255 characters