Improvement of sql setup. see comments

...ersion CE > 1.5, the test was if major < 2 AND minor < 5 which is wrong if major = 1 and minor > 7, it should be true