{"action":"created","issue":{"url":"https://api.github.com/repos/mbdavid/LiteDB/issues/398","repository_url":"https://api.github.com/repos/mbdavid/LiteDB","labels_url":"https://api.github.com/repos/mbdavid/LiteDB/issues/398/labels{/name}","comments_url":"https://api.github.com/repos/mbdavid/LiteDB/issues/398/comments","events_url":"https://api.github.com/repos/mbdavid/LiteDB/issues/398/events","html_url":"https://github.com/mbdavid/LiteDB/issues/398","id":197615596,"number":398,"title":"[Question] Handling old database files","user":{"login":"mcmonkey4eva","id":4000772,"avatar_url":"https://avatars.githubusercontent.com/u/4000772?v=3","gravatar_id":"","url":"https://api.github.com/users/mcmonkey4eva","html_url":"https://github.com/mcmonkey4eva","followers_url":"https://api.github.com/users/mcmonkey4eva/followers","following_url":"https://api.github.com/users/mcmonkey4eva/following{/other_user}","gists_url":"https://api.github.com/users/mcmonkey4eva/gists{/gist_id}","starred_url":"https://api.github.com/users/mcmonkey4eva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcmonkey4eva/subscriptions","organizations_url":"https://api.github.com/users/mcmonkey4eva/orgs","repos_url":"https://api.github.com/users/mcmonkey4eva/repos","events_url":"https://api.github.com/users/mcmonkey4eva/events{/privacy}","received_events_url":"https://api.github.com/users/mcmonkey4eva/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-26T19:51:02Z","updated_at":"2016-12-26T21:00:10Z","closed_at":null,"body":"```\r\nSystem.NotImplementedException: The method or operation is not implemented.\r\n   at LiteDB.ByteReader.ReadBsonValue(UInt16 length) in C:\\Github\\LiteDB\\LiteDB\\Utils\\ByteReader.cs:line 152\r\n   at LiteDB.IndexPage.ReadContent(ByteReader reader) in C:\\Github\\LiteDB\\LiteDB\\Engine\\Pages\\IndexPage.cs:line 53\r\n   at LiteDB.BasePage.ReadPage(Byte[] buffer) in C:\\Github\\LiteDB\\LiteDB\\Engine\\Pages\\BasePage.cs:line 165\r\n   at LiteDB.PageService.GetPage[T](UInt32 pageID) in C:\\Github\\LiteDB\\LiteDB\\Engine\\Services\\PageService.cs:line 38\r\n   at LiteDB.IndexService.GetNode(PageAddress address) in C:\\Github\\LiteDB\\LiteDB\\Engine\\Services\\IndexService.cs:line 325\r\n   at LiteDB.IndexService.Find(CollectionIndex index, BsonValue value, Boolean sibling, Int32 order) in C:\\Github\\LiteDB\\LiteDB\\Engine\\Services\\IndexService.cs:line 367\r\n   at LiteDB.LiteEngine.UpdateDocument(CollectionPage col, BsonDocument doc) in C:\\Github\\LiteDB\\LiteDB\\Engine\\Engine\\Update.cs:line 65\r\n   at LiteDB.LiteEngine.<>c__DisplayClass1_0.<Upsert>b__0(CollectionPage col) in C:\\Github\\LiteDB\\LiteDB\\Engine\\Engine\\Upsert.cs:line 37\r\n   at LiteDB.LiteEngine.Transaction[T](String collection, Boolean addIfNotExists, Func`2 action) in C:\\Github\\LiteDB\\LiteDB\\Engine\\Engine\\Transaction.cs:line 93\r\n   at LiteDB.LiteEngine.Upsert(String collection, BsonDocument doc) in C:\\Github\\LiteDB\\LiteDB\\Engine\\Engine\\Upsert.cs:line 17\r\n```\r\n\r\nThat's upserting an ordinary BsonDocument where the `_id` is a length:12 byte array. (`new BsonValue(byte[] value)`)\r\n\r\nEDIT: Do note that due to release configuration, line numbers are not exact!"},"comment":{"url":"https://api.github.com/repos/mbdavid/LiteDB/issues/comments/269241506","html_url":"https://github.com/mbdavid/LiteDB/issues/398#issuecomment-269241506","issue_url":"https://api.github.com/repos/mbdavid/LiteDB/issues/398","id":269241506,"user":{"login":"mbdavid","id":1137197,"avatar_url":"https://avatars.githubusercontent.com/u/1137197?v=3","gravatar_id":"","url":"https://api.github.com/users/mbdavid","html_url":"https://github.com/mbdavid","followers_url":"https://api.github.com/users/mbdavid/followers","following_url":"https://api.github.com/users/mbdavid/following{/other_user}","gists_url":"https://api.github.com/users/mbdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/mbdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbdavid/subscriptions","organizations_url":"https://api.github.com/users/mbdavid/orgs","repos_url":"https://api.github.com/users/mbdavid/repos","events_url":"https://api.github.com/users/mbdavid/events{/privacy}","received_events_url":"https://api.github.com/users/mbdavid/received_events","type":"User","site_admin":false},"created_at":"2016-12-26T21:00:10Z","updated_at":"2016-12-26T21:00:10Z","body":"If you have an old version (v2) you can just use \"upgrade=true\" in connection string. This will upgrade, if needs, to v3."}}
{"actor":{"display_login":"mbdavid"}}