i have to apply prefix to one of the existing applications. Application has lots of custom sql queries as well along with active record. e.g. as below
$sql = &q