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

应用启动时支持根据配置及schema.dgraph结构文件自动初始化Dgraph数据库结构 #7

Closed
wangyuheng opened this issue Aug 25, 2020 · 0 comments · Fixed by #8
Assignees
Labels
Doing enhancement New feature or request
Projects
Milestone

Comments

@wangyuheng
Copy link
Owner

wangyuheng commented Aug 25, 2020

背景

首次使用或者数据库结构发生变化后需要手动在数据库执行变更语句,在代码生成及开发调试阶段,为了快速迭代,希望可以在应用启动时自动执行相关变更。

针对生产环境是否可以自动执行,理论上是可以的。Dgraph重复执行schema变更是幂等操作,不会影响数据。
但是

  1. 大数据量时的执行速度未经过测试。
  2. 从DB管理角度,数据库变更应该被严格控制,记录操作留痕,方便审计、回滚等操作

方案

Spring容器初始化时根据配置判断是否运行dgraph schema初始化脚本、是否清空已有数据。

验收

  1. 根据配置实现DB结构根据schema.dgraph文件自动变更
@wangyuheng wangyuheng added the enhancement New feature or request label Aug 25, 2020
@wangyuheng wangyuheng added this to the 1.1.0 milestone Aug 25, 2020
@wangyuheng wangyuheng self-assigned this Aug 25, 2020
@wangyuheng wangyuheng changed the title 应用启动时支持自动初始化Dgraph schema 应用启动时支持根据Dgraph schema配置文件自动初始化Dgraph数据库结构 Aug 26, 2020
@wangyuheng wangyuheng changed the title 应用启动时支持根据Dgraph schema配置文件自动初始化Dgraph数据库结构 应用启动时支持根据配置及schema.dgraph结构文件自动初始化Dgraph数据库结构 Aug 26, 2020
@wangyuheng wangyuheng added this to Done in V1.1.0 Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Doing enhancement New feature or request
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant