Carl,
This code in subsite-procs.tcl is the problem
apm_parameter_unregister \
-package_key acs-subsite \
-parameter ApprovalExpirationDays \
{}
apm_parameter_unregister \
-package_key acs-subsite \
-parameter PasswordExpirationDays \
{}
}
I would comment out those to calls in the before_upgrade procedure. Its trying to remove those parameters which must have been added after 4.6.2. Since they don't exist in 5.2.0 the APM never created them for subsite.
I'll look into fixing this upgrade script to only try to remove the parameters if they actually exist, possibly changing apm_parameter_unregister to not fail with a database error if the parameter does not exist.