Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add post backup for contents and content_patch_logs #1669

Merged
merged 2 commits into from
Mar 3, 2022

Conversation

guqing
Copy link
Member

@guqing guqing commented Feb 21, 2022

What this PR does?

拆分了内容表后同步修改博客json备份和markdown备份

导入数据只支持导入与系统版本号具有相同主&次版本号的json数据,有几点考虑:

  1. 如果支持导入任意版本的备份,后续升级都需要做兼容还需要考虑跨版本升级,而功能不常用却投入巨大

要兼容跨版本升级和任意版本导入就要根据不同版本创建导入json的后置处理器,然后根据系统版本和备份版本选择执行哪些后置处理器和决策后置处理器的执行顺序,随着版本号增加,后置处理器会变多且随系统启动时一直被注册在系统中但该功能却只会在整个系统生命周期开始时被执行一次,投入与使用频率严重不成比例

  1. 用户可以选择先使用与导出备份相同的版本相同的 halo 大版本jar包升级系统导入json后在升级新版本jar包,这种情况只存在夸服务器迁移并升级
  2. 改动表结构才需要考虑兼容导入备份的逻辑,而改动表结构只会存在主(major)版本或次(minor)版本,因此退而求其次,允许在相同的主次版本之间随意导入json备份,减少了不必要的投入

@guqing guqing self-assigned this Feb 21, 2022
@guqing guqing added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 21, 2022
@guqing guqing added this to the 1.5.x milestone Feb 21, 2022
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTGM

Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ruibaby ruibaby merged commit d438163 into halo-dev:master Mar 3, 2022
winar-jin pushed a commit to winar-jin/halo that referenced this pull request Mar 24, 2022
* feat: Add post backup for contents and content_patch_logs
@guqing guqing deleted the feature/backup branch April 15, 2022 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants