Update db sql scripts and add new test cases.