Skip to content

Instantly share code, notes, and snippets.

@joar
Created August 22, 2011 18:50
Show Gist options
  • Save joar/1163169 to your computer and use it in GitHub Desktop.
Save joar/1163169 to your computer and use it in GitHub Desktop.
I deleted ALL the entries.
> var fire = db.media_entries.find().sort({created: -1}).limit(1)
> fire
{ "_id" : ObjectId("4e5024bad9d78315a6000000"), "attachment_files" : [
{
"filepath" : [
"media_entries",
"4e5024bad9d78315a6000000",
"attachment",
"DSC_2577.JPG"
],
"name" : "DSC_2577.JPG",
"created" : "Sun Aug 21 2011 14:27:50 GMT+0200 (CEST)"
},
{
"created" : "Sun Aug 21 2011 14:30:01 GMT+0200 (CEST)",
"name" : "Joar",
"filepath" : [
"media_entries",
"4e5024bad9d78315a6000000",
"attachment",
"DSC_2546.JPG"
]
}
], "created" : "Sat Aug 20 2011 23:18:50 GMT+0200 (CEST)", "description" : "Turning you head sideways can give permanent damages to your spinal cord.", "description_html" : "<p>Turning you head sideways can give permanent damages to your spinal cord.</p>", "fail_error" : null, "fail_metadata" : { }, "media_data" : { }, "media_files" : { "medium" : [ "media_entries", "4e5024bad9d78315a6000000", "medium.jpg" ], "thumb" : [ "media_entries", "4e5024bad9d78315a6000000", "thumbnail.jpg" ], "original" : [ "media_entries", "4e5024bad9d78315a6000000", "DSC_2397.JPG" ] }, "media_type" : "image", "plugin_data" : { }, "queued_media_file" : [ ], "queued_task_id" : null, "slug" : "feuer", "state" : "processed", "tags" : [ { "name" : "fire", "slug" : "fire" } ], "title" : "Feuer!", "uploader" : ObjectId("4e3c5e3dd9d7832c73000000") }
> db.media_entries.remove({_id: fire._id})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment