Add SQL update scripts and fix wrong mapping definition in check attribute

Add SQL update scripts from SOS 4.0.1 to 4.0.2 and fix wrong definition of the check attribute in the Hibernate mappings