database changes

rates table - added DetachID
detachment - deleted rateID
some columns are nullable