objectbox / objectbox/objectbox-java

DbExceptionListener for migration issues

未关闭
#355 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

enhancement
主要语言
Java
星标
4.6k
派生
311
PR 合并指标
30 天内没有已合并 PR

描述

Hi. Is possible to use new DbExceptionListener to handle migration issues and for example drop db?
I tried to add listener just after builder but it's too late and exception is thrown earlier.
I know that there shouldn't be any if everything is done correctly but in my case I can just drop db and recreate it with data from backend.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先跟踪 builder、DbExceptionListener 及 migration path 周围的初始化过程,以确定在添加 listener 之前异常是在哪里引发的。确定处理该 migration failure 时的预期行为,包括所要求的 drop-and-recreate flow;payload 未指定任何具体文件或测试,因此完成标准需要 maintainer 进一步明确。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
databases
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。