Updated and fixed db

added partial payments table and cleaned up the data base schema