Jump to content
X2Community Forums

"A database change failed to apply..." Can't install fresh 6.5 OR Upgrade from 6.x to Latest


Recommended Posts

I have attempted both a fresh install of the latest stable release as well as updating from 6.0 to 6.5. I am able to do a fresh install of 6.0 without issue, however not with 6.5. My host is Inmotion Hosting. Below is a copy of the error output: 

 

Exception: "A database change failed to apply: CREATE TABLE `x2_sessions_token` ( `id` char(128) NOT NULL, `user` varchar(255) DEFAULT NULL, `lastUpdated` bigint(20) DEFAULT NULL, `IP` varchar(40) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;. The error message given was: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'x2_sessions_token' already exists
A database change failed to apply: CREATE TABLE `x2_sessions_token` ( `id` char(128) NOT NULL, `user` varchar(255) DEFAULT NULL, `lastUpdated` bigint(20) DEFAULT NULL, `IP` varchar(40) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;. The error message given was: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'x2_sessions_token' already exists<br />To restore the database to its previous state, use the database dump file update_backup.sql stored in protected/data<br /><br />Update failed.

Update failed." in xxxxxx/protected/components/UpdaterBehavior.php L2230

Link to post
Share on other sites

Which did you attempt to perform first, a fresh install or an update from 6.0? That update looks like it was performed on an installation that had already failed an update. Also, what error was preventing you from installing at 6.5? You might want to try removing the tables created upon install and starting fresh. Please let me know more about your situation and I can suggest possible courses to remedy.

Link to post
Share on other sites
  • 2 weeks later...

We got a similar error when trying to upgrade from 6.0.4 to 6.5:

 

Exception: "A database change failed to apply: ALTER TABLE `x2_actions` ADD COLUMN `locationId` int(10) unsigned NULL AFTER `timeSpent`, MODIFY COLUMN `calendarId` int(10) unsigned NULL AFTER `assignedTo`, ADD INDEX `calendarId` (`calendarId`) USING BTREE, ADD CONSTRAINT `calendarId` FOREIGN KEY `calendarId` (`calendarId`) REFERENCES `x2_calendars` (`id`) ON DELETE CASCADE ON UPDATE SET NULL;. 2 changes were applied prior to this failure:

  1. CREATE TABLE `x2_calendar_invites` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `actionId` int(10) unsigned NOT NULL, `email` varchar(255) DEFAULT NULL, `status` enum('Yes','No','Maybe') DEFAULT NULL, `inviteKey` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `actionId` (`actionId`), CONSTRAINT `x2_calendar_invites_ibfk_1` FOREIGN KEY (`actionId`) REFERENCES `x2_actions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  2. ALTER TABLE `x2_action_meta_data` ADD COLUMN `etag` varchar(255) NULL AFTER `eventStatus`, ADD COLUMN `remoteCalendarUrl` varchar(255) NULL AFTER `etag`, ADD COLUMN `remoteSource` int(11) NULL DEFAULT '0' AFTER `remoteCalendarUrl`;

We are hosting the system ourselves - Linux environment running CentOS 6.6, Apache webserver. Haven't had any issues with updates before. Restored the backup database after this failed update but wondering if we should just try the update again or is there a fix available?

Link to post
Share on other sites
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...