Hi,
I hate making incompatible changes, but we've had to do it with the
latest set of patches pushed to image_factory. Basically, what we were
calling 'image' objects in iwhd are now called 'target_image' objects
If you want to try and migrating your existing images to this new
format, you can try something like:
$> cat > update.js <<EOF
db.main.update({ _bucket : "images" }, { \$set: { _bucket :
"target_images" } }, false, true)
db.main.update({ _bucket : "images", object_type : "image" }, {
\$set: { object_type : "target_image" } }, false, true)
db.main.find({ _bucket : "provider_images", object_type :
"provider_image" }).forEach(function upd(pi) { pi.target_image=pi.image;
db.main.save(pi); })
db.main.update({ _bucket : "provider_images", object_type :
"provider_image" }, { \$unset: { image : 1 } }, false, true)
EOF
$> mongo --port 27018 repo update.js
$> mv _fs/images _fs/provider_images
If anyone wants to dig into creating a more useful migration
instructions, I'm happy to help.
Cheers,
Mark.