Store version as text not as integer

To support versions of the form '001' that otherwise would not be found
on disk under the 1_ prefix.

The type of the database column `version` was already text, so this was
probably the original intention.