Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

fix bug in mysql: default value CURRENT_TIMESTAMP #1391 #1392

Closed
wants to merge 3 commits into from

Conversation

Jrohy
Copy link

@Jrohy Jrohy commented Aug 14, 2019

fix mysql table structure default value 'CURRENT_TIMESTAMP' and 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP' will lead to dump sql fail #1391

@codecov-io
Copy link

codecov-io commented Aug 14, 2019

Codecov Report

Merging #1392 into master will decrease coverage by 0.02%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1392      +/-   ##
==========================================
- Coverage   57.46%   57.43%   -0.03%     
==========================================
  Files          44       44              
  Lines        7915     7918       +3     
==========================================
  Hits         4548     4548              
- Misses       2804     2805       +1     
- Partials      563      565       +2
Impacted Files Coverage Δ
engine.go 62.59% <0%> (ø) ⬆️
dialect_mysql.go 58.55% <50%> (-0.23%) ⬇️
xorm.go 66.66% <0%> (-1.52%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b78ac8c...75ce546. Read the comment docs.

@Jrohy
Copy link
Author

Jrohy commented Aug 15, 2019

Fix import sql file split with ';' 提交修复的是导入sql文件时用';'改为';\n' , 因为表结构comment注释字段可以包含';', 例如:

CREATE TABLE IF NOT EXISTS `tb_tasklinkrule` (`ID` INT(11) PRIMARY KEY AUTO_INCREMENT NOT NULL COMMENT '自增长ID', `TASK_ID` INT(11) NULL COMMENT '任务ID', `LINKRULE_ID` INT(11) NULL COMMENT '规则ID; xxx') ENGINE=InnoDB DEFAULT CHARSET utf8;

注释里包含分号,则会导致sql切成不完整, 导致无法导入sql

@lunny
Copy link
Member

lunny commented Sep 29, 2019

I have merged #1437 . Is this still a problem?

@Jrohy
Copy link
Author

Jrohy commented Sep 29, 2019

no problem

@Jrohy Jrohy closed this Sep 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants