The free forums are no longer in use. It remains available as read-only archive.
11:52 am
April 14, 2012
finally got the restore process to execute but have this error with rokgallery during the restore
XCloner Automatic Restore! - wip4.bigvoice.com.au |
###MYSQL error Can't create table './littlev3_testres/jos_rokgallery_file_loves.frm' (errno: 150) ###On Query: |
gives me the following sql query to alter
#
# Table structure for table `jos_rokgallery_file_loves`
#
CREATE TABLE `jos_rokgallery_file_loves` (
`file_id` int(10) unsigned NOT NULL default '0',
`kount` int(11) NOT NULL default '0',
PRIMARY KEY (`file_id`),
UNIQUE KEY `file_id` (`file_id`),
CONSTRAINT `jos_file_loves_file_id_files_id` FOREIGN KEY (`file_id`) REFERENCES `jos_rokgallery_files` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
But have no idea what to change...
Obviously could disable/uninstall rok gallery before doing backup/clone process but kinda defeats the purpose.
Any assistance much appreciated.
Regards.
11:09 am
April 14, 2012
I'm actually migrating the site within the same hosting provider/account.
As it's working on the original site and others on that hosting account i can't see why it wouldn't be working on the new one.
My assumption is that the rokgallery install perhaps makes changes/adds tables etc to the database when installed but they are not there during the restore.
Any other pointers to check?
2:19 pm
April 14, 2012
if i use the phpmyadmin tool to tinker with the sql presented in the error i have to add spaces between create and table etc to get it to work.
If i remove the engine = innodb as well the table creates...my sql version is 5.0.92 is that an issue.
CREATE TABLE`jos_rokgallery_file_loves` (
`file_id` int( 10)unsigned NOT NULL default'0',
`kount` int( 11)NOT NULL default'0',
PRIMARY KEY (`file_id`) ,
UNIQUE KEY`file_id` (`file_id`) ,
CONSTRAINT`jos_file_loves_file_id_files_id`FOREIGN KEY (`file_id`)REFERENCES`jos_rokgallery_files` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) DEFAULT CHARSET= latin1;
11:11 am
April 14, 2012
Yes, plus putting spaces between some of the keywords like changing CREATETABLE to CREATE TABLE etc.
Odd behaviour as the tables exist on the same hosting provider with just on other subdirectories so innodb is running on this hosting provider.
I have two hosting provider accounts and can't run the innodb statement on either but can install rokgallery (which creates innodb tables) on both hosting accounts.
5:32 pm
June 20, 2012
Hi Admin,
You should add by default or add options to have the following:
… blablabla …
SET FOREIGN_KEY_CHECKS=1;
COMMIT;
If I do that manually, it works with Rock Gallery, if not it fails
Hope it will help
Regards
EDIT :
Mmm, those lines doesn't solve the problem.
When I export through phpMyAdmin, it adds constraints AFTER creating and inserting the data. You don't.
When I compare the INSERT line with phpMyAdmin I have NULL where with XCloner, I have '' (means empty string), it's not the same as far as I know.
Those 2 things may be that create the problem when restoring
Examples :
XCloner export:
DROP table IF EXISTS `h79a3_rokgallery_slices`;CREATE TABLE `h79a3_rokgallery_slices` (`id` int(10) unsigned NOT NULL AUTO_INCREMENT,`file_id` int(10) unsigned NOT NULL,`gallery_id` int(10) unsigned DEFAULT NULL,`guid` char(36) NOT NULL,`title` varchar(200) DEFAULT NULL,`caption` text,`link` text,`filesize` int(10) unsigned NOT NULL,`xsize` int(10) unsigned NOT NULL,`ysize` int(10) unsigned NOT NULL,`published` tinyint(1) NOT NULL DEFAULT '0',`admin_thumb` tinyint(1) NOT NULL DEFAULT '0',`manipulations` longtext,`palette` text,`created_at` datetime NOT NULL,`updated_at` datetime NOT NULL,`slug` varchar(255) DEFAULT NULL,`thumb_xsize` int(10) unsigned NOT NULL,`thumb_ysize` int(10) unsigned NOT NULL,`thumb_keep_aspect` tinyint(1) NOT NULL DEFAULT '1',`thumb_background` varchar(12) DEFAULT NULL,`ordering` int(10) unsigned NOT NULL,PRIMARY KEY (`id`),UNIQUE KEY `id` (`id`),UNIQUE KEY `guid` (`guid`),UNIQUE KEY `h79a3_rokgallery_slices_sluggable_idx` (`slug`,`gallery_id`),KEY `rokgallery_slices_published_idx` (`published`),KEY `rokgallery_slices_guid_idx` (`guid`),KEY `file_id_idx` (`file_id`),KEY `gallery_id_idx` (`gallery_id`),CONSTRAINT `h79a3_slices_file_id_files_id` FOREIGN KEY (`file_id`) REFERENCES `h79a3_rokgallery_files` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,CONSTRAINT `h79a3_slices_gallery_id_galleries_id` FOREIGN KEY (`gallery_id`) REFERENCES `h79a3_rokgallery_galleries` (`id`) ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=InnoDB AUTO_INCREMENT=2561 DEFAULT CHARSET=utf8;## End Structure for table `h79a3_rokgallery_slices`### Dumping data for table `h79a3_rokgallery_slices`#INSERT INTO `h79a3_rokgallery_slices` VALUES ('1', '1', '', '0503dd1b-a54e-4654-a968-a6455573c631', 'Admin Thumbnail', 'Admin Thumbnail', '', '9790', '300', '180', '0', '1', 'a:2:{i:0;O:37:"RokGallery_Manipulation_Action_Resize":4:{s:7:"*type";s:6:"resize";s:5:"width";i:300;s:6:"height";i:450;s:8:"*setup";b:1;}i:1;O:35:"RokGallery_Manipulation_Action_Crop":6:{s:7:"*type";s:4:"crop";s:4:"left";i:0;s:3:"top";i:135;s:5:"width";i:300;s:6:"height";i:180;s:8:"*setup";b:1;}}', '', '2011-12-22 14:38:49', '2011-12-22 14:38:49', 'admin-thumbnail', '150', '150', '1', '', '1206');DROP table IF EXISTS `h79a3_rokgallery_slices`;CREATE TABLE `h79a3_rokgallery_slices` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `file_id` int(10) unsigned NOT NULL, `gallery_id` int(10) unsigned DEFAULT NULL, `guid` char(36) NOT NULL, `title` varchar(200) DEFAULT NULL, `caption` text, `link` text, `filesize` int(10) unsigned NOT NULL, `xsize` int(10) unsigned NOT NULL, `ysize` int(10) unsigned NOT NULL, `published` tinyint(1) NOT NULL DEFAULT '0', `admin_thumb` tinyint(1) NOT NULL DEFAULT '0', `manipulations` longtext, `palette` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `slug` varchar(255) DEFAULT NULL, `thumb_xsize` int(10) unsigned NOT NULL, `thumb_ysize` int(10) unsigned NOT NULL, `thumb_keep_aspect` tinyint(1) NOT NULL DEFAULT '1', `thumb_background` varchar(12) DEFAULT NULL, `ordering` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`), UNIQUE KEY `guid` (`guid`), UNIQUE KEY `h79a3_rokgallery_slices_sluggable_idx` (`slug`,`gallery_id`), KEY `rokgallery_slices_published_idx` (`published`), KEY `rokgallery_slices_guid_idx` (`guid`), KEY `file_id_idx` (`file_id`), KEY `gallery_id_idx` (`gallery_id`), CONSTRAINT `h79a3_slices_file_id_files_id` FOREIGN KEY (`file_id`) REFERENCES `h79a3_rokgallery_files` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `h79a3_slices_gallery_id_galleries_id` FOREIGN KEY (`gallery_id`) REFERENCES `h79a3_rokgallery_galleries` (`id`) ON DELETE SET NULL ON UPDATE CASCADE) ENGINE=InnoDB AUTO_INCREMENT=2561 DEFAULT CHARSET=utf8;
phpMyAdmin export:
DROP TABLE IF EXISTS `h79a3_rokgallery_slices`;
CREATE TABLE IF NOT EXISTS `h79a3_rokgallery_slices` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`file_id` int(10) unsigned NOT NULL,
`gallery_id` int(10) unsigned DEFAULT NULL,
`guid` char(36) NOT NULL,
`title` varchar(200) DEFAULT NULL,
`caption` text,
`link` text,
`filesize` int(10) unsigned NOT NULL,
`xsize` int(10) unsigned NOT NULL,
`ysize` int(10) unsigned NOT NULL,
`published` tinyint(1) NOT NULL DEFAULT '0',
`admin_thumb` tinyint(1) NOT NULL DEFAULT '0',
`manipulations` longtext,
`palette` text,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`slug` varchar(255) DEFAULT NULL,
`thumb_xsize` int(10) unsigned NOT NULL,
`thumb_ysize` int(10) unsigned NOT NULL,
`thumb_keep_aspect` tinyint(1) NOT NULL DEFAULT '1',
`thumb_background` varchar(12) DEFAULT NULL,
`ordering` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `guid` (`guid`),
UNIQUE KEY `h79a3_rokgallery_slices_sluggable_idx` (`slug`,`gallery_id`),
KEY `rokgallery_slices_published_idx` (`published`),
KEY `rokgallery_slices_guid_idx` (`guid`),
KEY `file_id_idx` (`file_id`),
KEY `gallery_id_idx` (`gallery_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2561 ;
--
-- Contenu de la table `h79a3_rokgallery_slices`
--
INSERT INTO `h79a3_rokgallery_slices` (`id`, `file_id`, `gallery_id`, `guid`, `title`, `caption`, `link`, `filesize`, `xsize`, `ysize`, `published`, `admin_thumb`, `manipulations`, `palette`, `created_at`, `updated_at`, `slug`, `thumb_xsize`, `thumb_ysize`, `thumb_keep_aspect`, `thumb_background`, `ordering`) VALUES
(1, 1, NULL, '0503dd1b-a54e-4654-a968-a6455573c631', 'Admin Thumbnail', 'Admin Thumbnail', NULL, 9790, 300, 180, 0, 1, 'a:2:{i:0;O:37:"RokGallery_Manipulation_Action_Resize":4:{s:7:"*type";s:6:"resize";s:5:"width";i:300;s:6:"height";i:450;s:8:"*setup";b:1;}i:1;O:35:"RokGallery_Manipulation_Action_Crop":6:{s:7:"*type";s:4:"crop";s:4:"left";i:0;s:3:"top";i:135;s:5:"width";i:300;s:6:"height";i:180;s:8:"*setup";b:1;}}', NULL, '2011-12-22 14:38:49', '2011-12-22 14:38:49', 'admin-thumbnail', 150, 150, 1, NULL, 1206);
ALTER TABLE `h79a3_rokgallery_slices`
ADD CONSTRAINT `h79a3_slices_file_id_files_id` FOREIGN KEY (`file_id`) REFERENCES `h79a3_rokgallery_files` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `h79a3_slices_gallery_id_galleries_id` FOREIGN KEY (`gallery_id`) REFERENCES `h79a3_rokgallery_galleries` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
D.
1 Guest(s)