REFERENCES `ratna`.`image_tag` (`tag` )
is not valid, because
image_tag does not have any index that begins with
tag. As explained in the documentation:
InnoDBpermits a foreign key to reference any index column or group of columns. However, in the referenced table, there must be an index where the referenced columns are listed as the first columns in the same order.
("The referenced table" in this case is
image_tag, and "the referenced columns" are just