I know there are similar questions asked several times and i looked almost each and every answers but didn't find this issue resolved in my case.
I am getting this error:
1215 - Cannot add foreign key constraint
When I am importing an exact copy of the database which i had exported from the same server few minutes ago.
Please see the error information below:
Error
SQL query:
--
-- Constraints for table `lof_gallery_album_post`
--
ALTER TABLE `lof_gallery_album_post`
ADD CONSTRAINT `LOF_GALLERY_ALBUM_POST_ALBUM_ID_LOF_GALLERY_ALBUM_ALBUM_ID`
FOREIGN KEY ( `album_id` ) REFERENCES `lof_gallery_album` ( `album_id` )
ON DELETE CASCADE ,
ADD CONSTRAINT `LOF_GALLERY_ALBUM_STORE_POST_ID_VES_BLOG_POST_POST_ID`
FOREIGN KEY ( `post_id` ) REFERENCES `ves_blog_post` ( `post_id` )
ON DELETE CASCADE ;
MySQL said: Documentation
1215 - Cannot add foreign key constraint
Any idea what's wrong with that and how to solve this issue?