SQL file indicates, as noted by a reply above:
NOT NULL auto_increment,
but when I install the module, what gets written into the database is
NOT NULL default '0',
The solution, at least for me (and which I'm posting as it might help others), is that I download the database, manually edit the line to correct it, then restore the corrected database - it seems to work fine and the database seems to remain correct thereafter.
Not sure why this happens, that's the next problem to figure out - could be my server/php, could be some other module, but at least it seems to be fixable on a case by case basis.