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

能否针对时间字段增加为0000-00-00这种日期的检查开关? #81

Open
dwwang1992 opened this issue Aug 14, 2018 · 0 comments

Comments

@dwwang1992
Copy link

create table tb1
(id int unsigned not null auto_increment comment 'a',
b timestamp not null default '0000-00-00 00:00' comment 'b',
primary key(id)
) engine=innodb charset utf8 comment='tb1';
有些场景,需要设置默认值为上述0000-00-00 00:00的非空默认值

目前inception检查时默认不通过(即使后端sql_mode关闭了参数NO_ZERO_IN_DATE 和 NO_ZERO_DATE),报错如下:
Invalid default value for column 'b'.

是否可以增加一个开关选项,不控制此类时间默认值的检查,由后端的数据源的sql_mode返回呢

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