Making sure rows are unique or updated.