Check the max patch number in the db
Create the matchedNums array first