Fixed db gen script