Re: [xwiki-users] Update From 9.2 to 9.3.1 - Failed
Looks like this is the failure: java.sql.SQLException: Cannot add foreign key constraint and org.hibernate.HibernateException: Failed updating schema while executing query [alter table activitystream_events_status add index FKBF7104E8CB8C5002 (ases_eventid), add constraint FKBF7104E8CB8C5002 foreign key (ases_eventid) references activitystream_events (ase_eventid)] com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:652) com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:393) So it appears to be the same problem as https://jira.xwiki.org/browse/XWIKI-14225, however, this is *not *the case for me, my activitystream table is already INNODB: Thomas Mortagne <https://jira.xwiki.org/secure/ViewProfile.jspa?name=tmortagne> added a comment - 25/Apr/17 04:25 *The issue was that activitystream_events was still MyISAM for some reason. Converting it to INNODB fix it.*
Sorry, actitvitystream_events table and for that matter, I checked, and all tables are INNODB. I ran the query manually and it does fail, but no additional info: ALTER TABLE activitystream_events_status ADD INDEX FKBF7104E8CB8C5002 (ases_eventid), ADD CONSTRAINT FKBF7104E8CB8C5002 FOREIGN KEY (ases_eventid) REFERENCES activitystream_events (ase_eventid); /* SQL Error (1215): Cannot add foreign key constraint */ Ah, activitystream_events_status is latin1_swedish_ci and activitystream_events is utf8_bin. Not sure how that happened, I'm guessing that is not intentional and I'm sure that's what's causing the failure. What collation should the tables be, utf8_bin, I assume? On Mon, May 1, 2017 at 8:14 AM, Keith Davis <[email protected]> wrote:
Looks like this is the failure:
java.sql.SQLException: Cannot add foreign key constraint
and
org.hibernate.HibernateException: Failed updating schema while executing query [alter table activitystream_events_status add index FKBF7104E8CB8C5002 (ases_eventid), add constraint FKBF7104E8CB8C5002 foreign key (ases_eventid) references activitystream_events (ase_eventid)]
com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema( XWikiHibernateBaseStore.java:652)
com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema( XWikiHibernateBaseStore.java:393)
So it appears to be the same problem as https://jira.xwiki.org/ browse/XWIKI-14225, however, this is *not *the case for me, my activitystream table is already INNODB:
Thomas Mortagne <https://jira.xwiki.org/secure/ViewProfile.jspa?name=tmortagne> added a comment - 25/Apr/17 04:25
*The issue was that activitystream_events was still MyISAM for some reason. Converting it to INNODB fix it.*
-- Keith Davis 214-906-5183
There were 4-5 tables that were not UTF8. This is probably because UTF8 was not our default collation for the MySQL servers originally, but it is now. I converted those latin1_swedis_ci tables. That fixed the issue. On Mon, May 1, 2017 at 8:27 AM, Keith Davis <[email protected]> wrote:
Sorry, actitvitystream_events table and for that matter, I checked, and all tables are INNODB.
I ran the query manually and it does fail, but no additional info:
ALTER TABLE activitystream_events_status ADD INDEX FKBF7104E8CB8C5002 (ases_eventid), ADD CONSTRAINT FKBF7104E8CB8C5002 FOREIGN KEY (ases_eventid) REFERENCES activitystream_events (ase_eventid); /* SQL Error (1215): Cannot add foreign key constraint */
Ah, activitystream_events_status is latin1_swedish_ci and activitystream_events is utf8_bin. Not sure how that happened, I'm guessing that is not intentional and I'm sure that's what's causing the failure. What collation should the tables be, utf8_bin, I assume?
On Mon, May 1, 2017 at 8:14 AM, Keith Davis <[email protected]> wrote:
Looks like this is the failure:
java.sql.SQLException: Cannot add foreign key constraint
and
org.hibernate.HibernateException: Failed updating schema while executing query [alter table activitystream_events_status add index FKBF7104E8CB8C5002 (ases_eventid), add constraint FKBF7104E8CB8C5002 foreign key (ases_eventid) references activitystream_events (ase_eventid)]
com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWi kiHibernateBaseStore.java:652)
com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWi kiHibernateBaseStore.java:393)
So it appears to be the same problem as https://jira.xwiki.org/brow se/XWIKI-14225, however, this is *not *the case for me, my activitystream table is already INNODB:
Thomas Mortagne <https://jira.xwiki.org/secure/ViewProfile.jspa?name=tmortagne> added a comment - 25/Apr/17 04:25
*The issue was that activitystream_events was still MyISAM for some reason. Converting it to INNODB fix it.*
-- Keith Davis 214-906-5183 <(214)%20906-5183>
-- Keith Davis 214-906-5183
participants (1)
-
Keith Davis