version migration fails if version is an integer

The migration 043 fails to account for the case where the version
was specified as a string or version contains non-ascii characters.
This breaks migration for folks that have those incorrect templatesx
 in their database.

Change-Id: I9c2143c9d7a4d61ff41d32ee0f7b12a5640eec72
Closes-bug: 1299174
Merge "version migration fails if version is an integer"