Fixed bug where votes would not be deleted with deals, included sql schema