mysql fails to create the tables for the spring-batch-core, because there are small errors inside the sql script.
CREATE TABLE BATCH_JOB_INSTANCE (
JOB_INSTANCE_ID BIGINT unsigned PRIMARY KEY ,
CREATE TABLE BATCH_JOB_EXECUTION (
JOB_INSTANCE_ID BIGINT NOT NULL,
constraint JOB_INSTANCE_EXECUTION_FK foreign key (JOB_INSTANCE_ID)
The column JOB_INSTANCE_ID is defined as an unsigned BIGINT in the table TABLE BATCH_JOB_INSTANCE. But the referencing column inside the CREATE TABLE BATCH_JOB_EXECUTION is not defined as an unsigned BIGINT.
Unfortunately mysql throws an erno:150, because of the type mismatch between the target and the reference. We should change the type of all references to the column JOB_INSTANCE_ID to an unsigned BIGINT.
Another issue is the table engine definition, actually mysql uses the default table engine (InnoDB, MyIsam). We should set the InnoDB as the engine for all tables except the last ones which are used for primary key generation (they must use the myisam engine).