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

DB 升级 SQL 记录 #27

Open
zxc0328 opened this issue Nov 2, 2020 · 0 comments
Open

DB 升级 SQL 记录 #27

zxc0328 opened this issue Nov 2, 2020 · 0 comments

Comments

@zxc0328
Copy link
Member

zxc0328 commented Nov 2, 2020

在这次重构中,我们会有很多地方需要去对原来的表结构做修改。所以我们需要有一个统一的地方去把这些动作记录下来。最后这些记录汇聚为一个 SQL 文件,在最后上线之前在 DB 上跑一下,升级,然后就可以发布了。

同样,在本地开发时,我们先用线上 DB 结构做基础,然后跑一下升级的这个 SQL,就可以开发了。如果不统一记录的话,就没法一起开发了。或者说如果直接去改 createTable 语句的话,其实也不太好。因为现在是用的线上 DB 的导出做为 mock 数据的,所以在线上的基础上去升级会更方便。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant