[otrs-cvs] otrs/scripts/database/update otrs-upgrade-to-3.2.xml, 1.19, 1.20

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs/scripts/database/update
In directory lancelot:/tmp/cvs-serv28498/scripts/database/update

Modified Files:
	otrs-upgrade-to-3.2.xml 
Log Message:
Fixed bug#9092 - Problem running DBUpdate-to-3.2.mysql.sql on InnoDB.

Author: mg

Index: otrs-upgrade-to-3.2.xml
===================================================================
RCS file: /home/cvs/otrs/scripts/database/update/otrs-upgrade-to-3.2.xml,v
retrieving revision 1.19
retrieving revision 1.20
diff -2 -u -d -r1.19 -r1.20
--- otrs-upgrade-to-3.2.xml	7 Nov 2012 16:24:08 -0000	1.19
+++ otrs-upgrade-to-3.2.xml	29 Jan 2013 08:55:43 -0000	1.20
@@ -13,8 +13,27 @@
 
 <!-- Drop unneeded indices in the article_flags table -->
+<!-- First drop the foreign key constraings to work around a MySQL issue, see bug#9092. -->
+<TableAlter Name="article_flag">
+    <ForeignKeyDrop ForeignTable="article">
+        <Reference Local="article_id" Foreign="id"/>
+    </ForeignKeyDrop>
+    <ForeignKeyDrop ForeignTable="users">
+        <Reference Local="create_by" Foreign="id"/>
+    </ForeignKeyDrop>
+</TableAlter>
+<!-- Now drop the indices. -->
 <TableAlter Name="article_flag">
     <IndexDrop Name="article_flag_create_by"/>
     <IndexDrop Name="article_flag_article_id_article_key"/>
 </TableAlter>
+<!-- Now recreate the foreign key constraints. -->
+<TableAlter Name="article_flag">
+    <ForeignKeyCreate ForeignTable="article">
+        <Reference Local="article_id" Foreign="id"/>
+    </ForeignKeyCreate>
+    <ForeignKeyCreate ForeignTable="users">
+        <Reference Local="create_by" Foreign="id"/>
+    </ForeignKeyCreate>
+</TableAlter>
 
 <!-- Drop unneeded field group_id from ticket table -->
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.