最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

mobile - Drizzle Expo Database reset - Stack Overflow

programmeradmin2浏览0评论

I am working with expo-SQLite and and drizzle.

It hasn't happened yet, but incase a migration fails, I would like to just clear the local database and start over. For my use case its fine to clear the local data as the next step would be to just sync with the backend and reload the data when the user re-authenticates any.

Looking at the documentation, there does seem to be a "reset" call. The useMigration hook returns a success or an error. Ideally I would like to clear everything and then rerun the migrations/db initialization.

Is there currently a way to do this with Drizzle? I know other orms have something like this like watermelonDb has "unsafeResetDatabase"

发布评论

评论列表(0)

  1. 暂无评论