"Up to code" may mean totally rewiring to 200 amp service. This means new meter box, new weather post, new service wires. My son wanted to upgrade and the city refused to approve the 100 amp service. He was allowed to do all the work himself except for connecting to the pole and it cost him about $400 in materials. Compare this to the cost of a repair if the service is sufficient, maybe $100 or so, including labor, depending on local electrician rates.
Mike D.