DeemOpen/zkui

All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead

forward9 opened this issue · 0 comments

问题描述:
在 mysql Ver 15.1 Distrib 10.1.28-MariaDB 上执行V1__Core.sql 正常.
在 mysql Ver 14.14 Distrib 5.7.18 上执行报All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead. (需要将堆栈打印到日志才能看到, 否则可能看到Error trying to migrate db! Not severe hence proceeding forward.)

解决方法:
修改文件V1__Core.sql ,
将 id bigint default null auto_increment primary key 改为 id bigint not null auto_increment primary key 即可.
重新启动之前把库中表schema_version删掉, 以免出现其它问题.