Hi,
I go this error during setup.
Creating tables...
MySQL Query ( ALTER TABLE `wp_comments` ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`imageid`) REFERENCES `wp_images` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; ) Failed. Error: Key column 'imageid' doesn't exist in table
Any ideas on how to resolve this error?
Thank you,
spellmank
Comments
Yeah, I don't recommend using "wp_" as a prefix. Try "zp_" instead ;-)
I changed the prefix to "zp_" and that did the trick.
spellmank
So for example, I have one instance of zenphoto installed at /one then my table names would be one_albums, one_images, one_comments.
Before I got this error I only had 2 installations, one with zenphoto 1.0.2 another with zenphoto 1.0.3. Now that I'm installing a second version of 1.0.3 I get this error. According to THIS there's a conflict with the contraints.
May I suggest in the next version that the constraint names are also prefixed with the table prefix?
I've modified the setup.php to do this and I'm now able to install the second instance of 1.0.3.
Thanks, Tristan.
`$conf['mysql_prefix'] = ""; `
to
`$conf['mysql_prefix'] = "your_prefix_here_";`