Bugfix for sql script

Fixed a bug which caused all single db options to install only the last db.
Merge pull request #591 from rcythr/develop

Bugfix for sql script