Whenever any ditch or canal has been constructed for the purpose of conveying water and selling the same for irrigating purposes, it is unlawful for the owner or owners of said ditch or canal to change the line of said ditch or canal so as to prevent or interfere with the use of water from said ditch or canal, by any one who, prior to the proposed change, had used water for irrigating purposes from said ditch or canal.