Removed unique on contract_id

Removed unique on contract_id and added necessary migration.

@xliiv, please review.