The most sensible solution is to regulate water so as to price farmers out of production in times of drought. When the rains come back (and they will), they can grow to their heart's content. Ag is 2% of California's economy. It's not worth the investment.
One problem is that many of those farmers have "senior water rights" (pre-1914), which means that although the government can, in an emergency, limit the quantity of water that they draw, they can't charge money for using it, AFAIK. But yes, in principle, I agree that we need to find some way to do so, or the equivalent.
And we really do need to cut back on alfalfa production and water the almond trees less. It will drive up the price of almonds and possibly milk, but it needs to be done.
This is, of course, secondary to the question of whether we need desalination plants. The population is continuing to grow, and the fresh water supply isn't continuing to grow with it. So even if we forced farmers to cut back on water-hungry crops, that's still just a stopgap solution; in the long term, even that won't be enough.