If an improvement is made upon a street occupied by a street railway or any railroad enjoying a franchise on the street, the city council shall assess against the railroad its just proportion of making the improvement which shall be not less than the expense of improving the space between the rails of the railroad and for a distance of one foot on each side. The assessment against the railroad shall be made on the rolls of the improvement district the same as against other property in the district and shall be a lien on that portion of the railroad within the district from the time of the equalization of the roll. The lien may be foreclosed by a civil action in superior court and the same period of redemption from any sale on foreclosure shall be allowed as is allowed in cases of sale of real estate upon execution.