# Chapter 6: Migrating non-sequential versions

**URL:** <https://forums.kodeco.com/t/chapter-6-migrating-non-sequential-versions/172366>\
**Category:** Core Data by Tutorials\
**Created:** [June 1, 2022, 6:00pm UTC](https://forums.kodeco.com/t/chapter-6-migrating-non-sequential-versions/172366 "2022-06-01T18:00:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joseines](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/joseines/32/108350_2.png) [@joseines](https://forums.kodeco.com/u/joseines)\
**Post date:** [June 1, 2022, 6:00pm UTC](https://forums.kodeco.com/t/chapter-6-migrating-non-sequential-versions/172366/1 "2022-06-01T18:00:52Z")

</div>

I got some data corruption errors when trying this chapter.  
SQLLite databases have the default option to use journaling.

I fixed this in the CoreDataStack by setting the journal\_mode to DELETE:

```auto
 lazy var storeDescription: NSPersistentStoreDescription = {
        let description = NSPersistentStoreDescription(url: self.storeURL)
        description.setValue("DELETE" as NSObject, forPragmaNamed: "journal_mode")
        description.shouldMigrateStoreAutomatically = true
        description.shouldInferMappingModelAutomatically = false
        
        return description
    }()

```

---

<div class="post-metadata">

**Author:** ![robertomachorro](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/robertomachorro/32/111603_2.png) [@robertomachorro](https://forums.kodeco.com/u/robertomachorro)\
**Post date:** [June 2, 2022, 11:07am UTC](https://forums.kodeco.com/t/chapter-6-migrating-non-sequential-versions/172366/2 "2022-06-02T11:07:42Z")

</div>

thanks for sharing! I’ll pass this along to the authors, @pietrorea @astralbodies

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [November 15, 2022, 10:01am UTC](https://forums.kodeco.com/t/chapter-6-migrating-non-sequential-versions/172366/4 "2022-11-15T10:01:29Z")

</div>

This topic was automatically closed after 166 days. New replies are no longer allowed.
