checkpoint of lsb fixer script: most sql now generated