Improved 'add-collection-to-db' target.