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? #3

Closed
ElfSundae opened this issue Mar 16, 2022 · 2 comments
Closed

怎么更新 db? #3

ElfSundae opened this issue Mar 16, 2022 · 2 comments

Comments

@ElfSundae
Copy link

我用的 douyasi/identity-card PHP 包,发现有几个城市名字没更新,想更新下数据库。
执行 crawler.php 只更新了 txt 和 all.php,db 下文件没更新,想问下怎么更新数据库文件?谢谢。

@ycrao
Copy link
Member

ycrao commented May 9, 2022

刚去民政部官网看了一下,全量数据还停留在 2020 年,如果有缺失,尽量提 issue 和参考来源。

因为这边已经是明文 txt 数据,那就看你用啥语言读写 sqlite 文件了,你甚至可以通过 navicat 客户端 sql 写入,不过经过我测试,图形客户端写入的文件大小可能比纯语言 api 写入的文件大(可能产出物文件包含额外附属信息)。组合数据时,你需要注意原始 sqlite 数据表各字段含义,以便兼容和改写该 php 包。

@ElfSundae
Copy link
Author

@ycrao 感谢回复。可能是我理解有问题,之前是发现有几个县升级成市了,但是用这个库查出来的地区还是旧的县名字,当时以为是数据没更新。
刚再看了下数据库文件,旧的县名称和新的市名称都在数据库里,行政代码不一样。可能从改市之后的新生儿身份证会用新的行政代码吧。

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

2 participants