Update query-generator.js

Added CREATE INDEX **IF NOT EXISTS**