fixed models name unique constraint, ci_uid could be null