Limit varchar column length

MySQL can do some optimisations when columns are shorter. Let's apply some sensible constraints to some of these columns.

These values give us plenty of space to move, based on current production data.

Transfer `code` is limited to 47 characters.
Account `identifier` is limited to 31 characters.
Account `scope` is limited to 23 characters.
Aggregate `function` and `range_type` are limited to 15 characters.