Updated database schema version number from 3 to 4
Added code to update database schema of existing databases from version 3 to version 4