DeemOpen / zkui

A UI dashboard that allows CRUD operations on Zookeeper.
2.36k stars 977 forks source link

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

Open forward9 opened 6 years ago

forward9 commented 6 years ago

问题描述: 在 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删掉, 以免出现其它问题.