{"action":"closed","issue":{"url":"https://api.github.com/repos/danielebailo/couchdb-dump/issues/12","labels_url":"https://api.github.com/repos/danielebailo/couchdb-dump/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/danielebailo/couchdb-dump/issues/12/comments","events_url":"https://api.github.com/repos/danielebailo/couchdb-dump/issues/12/events","html_url":"https://github.com/danielebailo/couchdb-dump/issues/12","id":55042336,"number":12,"title":"[BUG] - Design documents cause insert failures","user":{"login":"dalgibbard","id":1159620,"avatar_url":"https://avatars.githubusercontent.com/u/1159620?v=3","gravatar_id":"","url":"https://api.github.com/users/dalgibbard","html_url":"https://github.com/dalgibbard","followers_url":"https://api.github.com/users/dalgibbard/followers","following_url":"https://api.github.com/users/dalgibbard/following{/other_user}","gists_url":"https://api.github.com/users/dalgibbard/gists{/gist_id}","starred_url":"https://api.github.com/users/dalgibbard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalgibbard/subscriptions","organizations_url":"https://api.github.com/users/dalgibbard/orgs","repos_url":"https://api.github.com/users/dalgibbard/repos","events_url":"https://api.github.com/users/dalgibbard/events{/privacy}","received_events_url":"https://api.github.com/users/dalgibbard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-21T16:33:50Z","updated_at":"2015-01-22T15:47:26Z","closed_at":"2015-01-22T15:47:26Z","body":"In a CouchDB Database which has _design documents defined (data restrictions, views etc), when exporting the JSON using ./couchdb-dump, these special document types are appended to the end of the JSON dump.\r\n_bulk_docs can't handle these, so the last split file to be inserted fails for all documents contained within it.\r\n\r\nThe fix here is to break out all of the _design documents from the exported JSON when we want to restore the data, and handle these first.\r\n\r\nNOTE: I have the fix for this already; i'll request a merge in a little while."}}