Scala migration: fuction for SubQuery, ColumnQuery(left only),
OrScopeQuery