Fix custom_fields errors in other/upgrade_2-1*.sql files

Fixes errors created by commit 754c249ef32948df6fe17bae0a03c3379a7a2afe