mysql - SQL commands not compliable by H2 -
the following sql commands mysql. not sql expert , not know h2. spring app throws exception because user_roles table can not created. has problem fk_username_idx : drop table if exists users; drop table if exists user_roles; create table users ( userid varchar(5) not null, username varchar(45) not null , password varchar(60) not null , enabled tinyint not null default 1 , primary key (userid)); create table user_roles ( user_role_id int(11) not null auto_increment, userid varchar(5) not null, role varchar(45) not null, primary key (user_role_id), unique key uni_username_role (role,userid), key fk_username_idx (userid), constraint fk_username foreign key (userid) references users (userid)); error log: caused by: org.h2.jdbc.jdbcsqlexception: unbekannter datentyp: "fk_username_idx" unknown data type: "fk_username_idx"; sql statement: create table user_roles ( user_role_id int(11) not null auto_increment, userid v...