cboard支持MySQL8么_[解决方案]CBoard在Mysql5.5及以下版本安装报错[亲测有效]

cboard支持MySQL8么_[解决方案]CBoard在Mysql5.5及以下版本安装报错[亲测有效]Pleasefollowthebelowinstructionstocreateanewsystembug,otherwise,wecan’thelpyoueffectively.(请严格遵循下列格式创建系统Bug主题,否则我们可能很难有效帮助到你)Whatstepswillreproducetheproblem?(该问题的重现步骤是什么?)CBoard…

大家好,欢迎来到IT知识分享网。

Please follow the below instructions to create a new system bug, otherwise, we can’t help you effectively.(请严格遵循下列格式创建系统Bug主题,否则我们可能很难有效帮助到你)

What steps will reproduce the problem?(该问题的重现步骤是什么?)

CBoard 0.4以上版本, 在Mysql5.5及以下的版本安装, 执行数据库建表语句时.

即执行

ALTER TABLE dashboard_dataset ADD create_time TIMESTAMP DEFAULT now();

ALTER TABLE dashboard_dataset ADD update_time TIMESTAMP DEFAULT now();

ALTER TABLE dashboard_datasource ADD create_time TIMESTAMP DEFAULT now();

ALTER TABLE dashboard_datasource ADD update_time TIMESTAMP DEFAULT now();

ALTER TABLE dashboard_widget ADD create_time TIMESTAMP DEFAULT now();

ALTER TABLE dashboard_widget ADD update_time TIMESTAMP DEFAULT now();

ALTER TABLE dashboard_board ADD create_time TIMESTAMP DEFAULT now();

ALTER TABLE dashboard_board ADD update_time TIMESTAMP DEFAULT now();

这些语句时.

What is the expected output? What do you see instead?(你期待的结果是什么?实际看到的又是什么?)

正常应该无报错, 实际会报错..

What version of the product are you using? On what operating system?(你正在使用产品的哪个版本?在什么操作系统上?)

0.4.1, 0.4以上版本应该都会有类似的问题.

Please provide any additional information below.(如果有的话,请在下面提供更多信息。)

问题的解决有一段时间了, 没有保留错误的截图.

希望对使用低版本MySQL的同学能有些帮助.

我尝试的解决方法是:

create_time字段使用CURRENT_TIMESTAMP作为默认值.

update_time通过触发器来更新时间

CREATE TRIGGER insert_board_update_time_trigger before insert ON dashboard_board FOR EACH ROW set new.update_time = now();

CREATE TRIGGER update_board_update_time_trigger before update ON dashboard_board FOR EACH ROW set new.update_time = now();

CREATE TRIGGER insert_widget_update_time_trigger before insert ON dashboard_widget FOR EACH ROW set new.update_time = now();

CREATE TRIGGER update_widget_update_time_trigger before update ON dashboard_widget FOR EACH ROW set new.update_time = now();

CREATE TRIGGER insert_datasource_update_time_trigger before insert ON dashboard_datasource FOR EACH ROW set new.update_time = now();

CREATE TRIGGER update_datasource_update_time_trigger before update ON dashboard_datasource FOR EACH ROW set new.update_time = now();

CREATE TRIGGER insert_dataset_update_time_trigger before insert ON dashboard_dataset FOR EACH ROW set new.update_time = now();

CREATE TRIGGER update_dataset_update_time_trigger before update ON dashboard_dataset FOR EACH ROW set new.update_time = now();

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/25505.html

(0)
上一篇 2023-07-20 11:00
下一篇 2023-07-22 11:00

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

关注微信