Fix upgrade script to dynamically add COLUMN_MODIFIER and SALT_BUCKETS, Fix bug in detection of tables that require upgrade