modified max migration version calculator to return zero when there are no migrations found (to allow db init to function without migrations)