hertzbeat icon indicating copy to clipboard operation
hertzbeat copied to clipboard

升级脚本

Open Suremotoo opened this issue 2 years ago • 12 comments

随着版本一次次升级,新增特性功能、Bug 修复等,涉及到数据库表的调整时,能一并提供数据库表的升级脚本,像我之前刚开始使用,觉得不错,维护了大量监控数据,现在咱们的数据库表结构有变化,我需要手动迁移数据,挺费时间的。

每次数据库调整时,能一并提供数据库与上一次的变化,虽然我可以将当前的数据库表结构导出,与新的数据库脚本对比,但是导出后顺序也不一样,最终还是要从提交记录上找到之前的,也挺费时间。

如果能在一并提供数据库与上一次的变化的同时,也一并提供旧数据迁移的脚本,会更好!

假如新数据表字段是必填等信息,可以给予默认值,当然的,我们也可以自行更改默认值!

Suremotoo avatar Apr 08 '22 05:04 Suremotoo

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


As the version is upgraded again and again, new features and functions, bug fixes, etc., when it comes to the adjustment of the database table, the upgrade script of the database table can be provided together. Like I just started using it before, I feel good, and maintain a large amount of monitoring data. Now that our database table structure has changed, I need to manually migrate the data, which is very time-consuming.

Every time the database is adjusted, it can provide the changes of the database and the last time. Although I can export the current database table structure and compare it with the new database script, the order after the export is also different. In the end, it is still necessary to submit the records. It takes time to find the previous ones.

It would be even better if you could provide the database and the last changes and also provide the script for the migration of the old data!

If the new data table field is required and other information, you can give the default value, of course, we can also change the default value by ourselves!

Issues-translate-bot avatar Apr 08 '22 05:04 Issues-translate-bot

Hi 感谢反馈 这个问题确实应该重视起来,目前最近的两个版本没有mysql对应的关系表结构变更,但是因为指标的修改新增,对应TDengine的表结构可能会发生变化,它的表是有数据时自动创建的,这块确实没有考虑周到,tdengine会影响历史图表数据展示。 后面我们研究下指标表这块的升级问题。

tomsun28 avatar Apr 08 '22 07:04 tomsun28

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Hi thanks for the feedback. This issue should really be taken seriously. Currently, there is no relational table structure change corresponding to mysql in the recent two versions, but due to the modification and addition of indicators, the table structure corresponding to TDengine may change. Automatically created, this piece is really not thoughtful, tdengine will affect the display of historical chart data. Later, we will study the upgrade of the indicator table.

Issues-translate-bot avatar Apr 08 '22 07:04 Issues-translate-bot

感谢您的及时反馈!🙏🙏

我的就是升级至 Beta 7 后,首页监控表盘都是 0,且之前配置的 telnet 端口检测菜单没有了,不知道是不是取消了,我在 error log 文件中发现,凡是之前配置的 telnet 端口监控,全部都提示 The app telnet not support.

如图:

[首页监控表盘无数据图]

首页监控表盘无数据图

[ telnet 端口无法检测提示图] telnet 端口无法检测提示图

Suremotoo avatar Apr 08 '22 07:04 Suremotoo

hi 是因为之前telnet和port监控类型重复 删除了telnet导致 抱歉这个没有及时考虑到 需要在数据库的monitor表app字段将telnet的类型应用改为port类型

tomsun28 avatar Apr 08 '22 07:04 tomsun28

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


hi is because the telnet and port monitoring types were duplicated before, and telnet was deleted. Sorry for not taking this into account in time. You need to change the telnet type application to the port type in the app field of the monitor table of the database

Issues-translate-bot avatar Apr 08 '22 07:04 Issues-translate-bot

hi 是因为之前 telnet 和 port 监控类型重复 删除了 telnet 导致 抱歉这个没有及时考虑到 需要在数据库的 monitor 表 app 字段将 telnet 的类型应用改为 port 类型

已经修正成功!感谢🙏

Suremotoo avatar Apr 08 '22 07:04 Suremotoo

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


hi is because the telnet and port monitoring types were duplicated before, and telnet was deleted. Sorry for not taking this into account in time. It is necessary to change the telnet type application to the port type in the app field of the monitor table of the database.

Corrected successfully! Thanks 🙏

Issues-translate-bot avatar Apr 08 '22 07:04 Issues-translate-bot

@tomsun28 数据库版本可以使用SpringBoot集成Flyway,启动项目会校验数据库版本并执行更新(如果有的话)

gcdd1993 avatar May 01 '22 16:05 gcdd1993

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@tomsun28 The database version can be integrated with Flyway using SpringBoot, starting the project will verify the database version and perform the update (if any)

Issues-translate-bot avatar May 01 '22 16:05 Issues-translate-bot

+1,建议升级提上日程。

tonywen1990 avatar Aug 05 '23 03:08 tonywen1990

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


+1 for suggesting an upgrade be on the agenda.

hertzbeat avatar Aug 05 '23 03:08 hertzbeat