Bugfix for sql script

Fixed a bug which caused all single db options to install only the last db.