I got past the problem. It appears that MW 1.31 is not as permissive about the value of rev_content_model in the revision table. I had entries in the table which were 0, and MW 1.30 did not have a problem with it. However, 1.31 only accepts a value of NULL, otherwise it barfs.
Anyhow, I fixed it by forcing the 0 values in the revision table to their default value. The logic seems to be to be to use the content model from the revision if it is set to non-null, otherwise use the value in the page table. I suspect that earlier versions of MW accepted a revision content model of 0 as the same as NULL.
David Bohman