stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.64k stars 1.56k forks source link

Destructive Migration #1001

Closed Strife91 closed 4 years ago

Strife91 commented 4 years ago

Hello,

On Android Room there is a fallback method called "fallbackToDestructiveMigration()" that is triggered when database versions doesn't match and no migration schema can be found.

It simply deletes the old database and creates a new one to prevent the app from crashing.

I wonder if there is a way to recreate this behaviour in sqlite.swift? Code examples are very much appreciated.