Except as otherwise provided in this code, it is unlawful to construct or maintain in any stream in Districts 1, 138, 112, 178, 2, 214, 212, 234, 3, 312, 4, 418, 412, 434, 11, 12, 13, 23, and 25, any device or contrivance that prevents, impedes, or tends to prevent or impede, the passing of fish up and down stream.