store minted id's and associated pid's in database; closes #1159