nao consigo criar as fk's da tabela locacao, aparece Error Code: 1215. Cannot add foreign key constraint
create table automovel(
placa varchar(7) not null,
cor varchar(20),
num_portas int,
tp_combus varchar(30),
km float not null,
renavam float not null,
chassi varchar(30) not null,
vlr_loca float,
modelo varchar(30) not null,
marca varchar(20),
primary key (placa)
);
create table locacao(
pedido int auto_increment not null,
placa varchar(7),
dt_loca date,
hr_loca datetime,
dt_dev date,
hr_dev datetime,
km float,
vlr_loca float,
dev int,
primary key (pedido),
FOREIGN KEY (placa) REFERENCES automovel(placa),
FOREIGN KEY (km) REFERENCES automovel(km),
FOREIGN KEY (vlr_loca) REFERENCES automovel(vlr_loca)
);