Fix ums automtest

* externalisation of SQL request now available with a factory like system
* fix join in update problem
* fix missing drop table in restore