[FIX] do not run migration scripts on empty databases
[IMP] validate custom views at the end of update of database