[otrs-cvs] otrs/scripts DBUpdate-to-3.2.postgresql.sql, 1.19, 1.20 DBUpdate-to-3.2.ingres.sql, 1.19, 1.20 DBUpdate-to-3.2.db2.sql, 1.19, 1.20 DBUpdate-to-3.2.postgresql_before_8_2.sql, 1.19, 1.20 DBUpdate-to-3.2.mssql.sql, 1.19, 1.20 DBUpdate-to-3.2.mysql.sql, 1.19, 1.20 DBUpdate-to-3.2.oracle.sql, 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
In directory lancelot:/tmp/cvs-serv3456/scripts

Modified Files:
	DBUpdate-to-3.2.postgresql.sql DBUpdate-to-3.2.ingres.sql 
	DBUpdate-to-3.2.db2.sql 
	DBUpdate-to-3.2.postgresql_before_8_2.sql 
	DBUpdate-to-3.2.mssql.sql DBUpdate-to-3.2.mysql.sql 
	DBUpdate-to-3.2.oracle.sql 
Log Message:
Fixed bug#9135 - Can't upgrade databases that have been changed from MyISAM > InnoDB.

Author: mg

Index: DBUpdate-to-3.2.postgresql.sql
===================================================================
RCS file: /home/cvs/otrs/scripts/DBUpdate-to-3.2.postgresql.sql,v
retrieving revision 1.19
retrieving revision 1.20
diff -2 -u -d -r1.19 -r1.20
--- DBUpdate-to-3.2.postgresql.sql	29 Jan 2013 08:55:43 -0000	1.19
+++ DBUpdate-to-3.2.postgresql.sql	7 Feb 2013 10:08:32 -0000	1.20
@@ -1,4 +1,4 @@
 -- ----------------------------------------------------------
---  driver: postgresql, generated: 2013-01-29 10:07:16
+--  driver: postgresql, generated: 2013-02-07 11:23:44
 -- ----------------------------------------------------------
 SET standard_conforming_strings TO ON;

Author: mg

Index: DBUpdate-to-3.2.ingres.sql
===================================================================
RCS file: /home/cvs/otrs/scripts/DBUpdate-to-3.2.ingres.sql,v
retrieving revision 1.19
retrieving revision 1.20
diff -2 -u -d -r1.19 -r1.20
--- DBUpdate-to-3.2.ingres.sql	29 Jan 2013 08:55:43 -0000	1.19
+++ DBUpdate-to-3.2.ingres.sql	7 Feb 2013 10:08:32 -0000	1.20
@@ -1,4 +1,4 @@
 -- ----------------------------------------------------------
---  driver: ingres, generated: 2013-01-29 10:07:15
+--  driver: ingres, generated: 2013-02-07 11:23:44
 -- ----------------------------------------------------------
 -- ----------------------------------------------------------
@@ -26,7 +26,7 @@
 -- ----------------------------------------------------------
 ALTER TABLE ticket DROP COLUMN group_id RESTRICT;\g
-CREATE SEQUENCE pm_process_363;\g
+CREATE SEQUENCE pm_process_746;\g
 CREATE TABLE pm_process (
-    id INTEGER NOT NULL DEFAULT pm_process_363.NEXTVAL,
+    id INTEGER NOT NULL DEFAULT pm_process_746.NEXTVAL,
     entity_id VARCHAR(50) NOT NULL,
     name VARCHAR(200) NOT NULL,
@@ -42,7 +42,7 @@
 MODIFY pm_process TO btree unique ON id WITH unique_scope = statement;\g
 ALTER TABLE pm_process ADD PRIMARY KEY ( id ) WITH index = base table structure;\g
-CREATE SEQUENCE pm_activity_896;\g
+CREATE SEQUENCE pm_activity_961;\g
 CREATE TABLE pm_activity (
-    id INTEGER NOT NULL DEFAULT pm_activity_896.NEXTVAL,
+    id INTEGER NOT NULL DEFAULT pm_activity_961.NEXTVAL,
     entity_id VARCHAR(50) NOT NULL,
     name VARCHAR(200) NOT NULL,
@@ -56,7 +56,7 @@
 MODIFY pm_activity TO btree unique ON id WITH unique_scope = statement;\g
 ALTER TABLE pm_activity ADD PRIMARY KEY ( id ) WITH index = base table structure;\g
-CREATE SEQUENCE pm_activity_dialog_279;\g
+CREATE SEQUENCE pm_activity_dialog_787;\g
 CREATE TABLE pm_activity_dialog (
-    id INTEGER NOT NULL DEFAULT pm_activity_dialog_279.NEXTVAL,
+    id INTEGER NOT NULL DEFAULT pm_activity_dialog_787.NEXTVAL,
     entity_id VARCHAR(50) NOT NULL,
     name VARCHAR(200) NOT NULL,
@@ -70,7 +70,7 @@
 MODIFY pm_activity_dialog TO btree unique ON id WITH unique_scope = statement;\g
 ALTER TABLE pm_activity_dialog ADD PRIMARY KEY ( id ) WITH index = base table structure;\g
-CREATE SEQUENCE pm_transition_4;\g
+CREATE SEQUENCE pm_transition_837;\g
 CREATE TABLE pm_transition (
-    id INTEGER NOT NULL DEFAULT pm_transition_4.NEXTVAL,
+    id INTEGER NOT NULL DEFAULT pm_transition_837.NEXTVAL,
     entity_id VARCHAR(50) NOT NULL,
     name VARCHAR(200) NOT NULL,
@@ -84,7 +84,7 @@
 MODIFY pm_transition TO btree unique ON id WITH unique_scope = statement;\g
 ALTER TABLE pm_transition ADD PRIMARY KEY ( id ) WITH index = base table structure;\g
-CREATE SEQUENCE pm_transition_action_120;\g
+CREATE SEQUENCE pm_transition_action_871;\g
 CREATE TABLE pm_transition_action (
-    id INTEGER NOT NULL DEFAULT pm_transition_action_120.NEXTVAL,
+    id INTEGER NOT NULL DEFAULT pm_transition_action_871.NEXTVAL,
     entity_id VARCHAR(50) NOT NULL,
     name VARCHAR(200) NOT NULL,
@@ -129,7 +129,7 @@
     (1, 'ProcessManagementActivityID', 'ProcessManagementActivityID', 1, 'Text', 'Ticket', '---
DefaultValue: ''''
', 1, 1, current_timestamp, 1, current_timestamp);\g
 DROP TABLE sessions;\g
-CREATE SEQUENCE sessions_244;\g
+CREATE SEQUENCE sessions_118;\g
 CREATE TABLE sessions (
-    id BIGINT NOT NULL DEFAULT sessions_244.NEXTVAL,
+    id BIGINT NOT NULL DEFAULT sessions_118.NEXTVAL,
     session_id VARCHAR(100) NOT NULL,
     data_key VARCHAR(100) NOT NULL,

Author: mg

Index: DBUpdate-to-3.2.db2.sql
===================================================================
RCS file: /home/cvs/otrs/scripts/DBUpdate-to-3.2.db2.sql,v
retrieving revision 1.19
retrieving revision 1.20
diff -2 -u -d -r1.19 -r1.20
--- DBUpdate-to-3.2.db2.sql	29 Jan 2013 08:55:43 -0000	1.19
+++ DBUpdate-to-3.2.db2.sql	7 Feb 2013 10:08:32 -0000	1.20
@@ -1,4 +1,4 @@
 -- ----------------------------------------------------------
---  driver: db2, generated: 2013-01-29 10:07:15
+--  driver: db2, generated: 2013-02-07 11:23:44
 -- ----------------------------------------------------------
 -- ----------------------------------------------------------

Author: mg

Index: DBUpdate-to-3.2.postgresql_before_8_2.sql
===================================================================
RCS file: /home/cvs/otrs/scripts/DBUpdate-to-3.2.postgresql_before_8_2.sql,v
retrieving revision 1.19
retrieving revision 1.20
diff -2 -u -d -r1.19 -r1.20
--- DBUpdate-to-3.2.postgresql_before_8_2.sql	29 Jan 2013 08:55:43 -0000	1.19
+++ DBUpdate-to-3.2.postgresql_before_8_2.sql	7 Feb 2013 10:08:32 -0000	1.20
@@ -1,4 +1,4 @@
 -- ----------------------------------------------------------
---  driver: postgresql_before_8_2, generated: 2013-01-29 10:07:16
+--  driver: postgresql_before_8_2, generated: 2013-02-07 11:23:44
 -- ----------------------------------------------------------
 -- ----------------------------------------------------------

Author: mg

Index: DBUpdate-to-3.2.mssql.sql
===================================================================
RCS file: /home/cvs/otrs/scripts/DBUpdate-to-3.2.mssql.sql,v
retrieving revision 1.19
retrieving revision 1.20
diff -2 -u -d -r1.19 -r1.20
--- DBUpdate-to-3.2.mssql.sql	29 Jan 2013 08:55:43 -0000	1.19
+++ DBUpdate-to-3.2.mssql.sql	7 Feb 2013 10:08:32 -0000	1.20
@@ -1,4 +1,4 @@
 -- ----------------------------------------------------------
---  driver: mssql, generated: 2013-01-29 10:07:15
+--  driver: mssql, generated: 2013-02-07 11:23:44
 -- ----------------------------------------------------------
                 DECLARE @defnameticketgroup_read VARCHAR(200), @cmdticketgroup_read VARCHAR(2000)

Author: mg

Index: DBUpdate-to-3.2.mysql.sql
===================================================================
RCS file: /home/cvs/otrs/scripts/DBUpdate-to-3.2.mysql.sql,v
retrieving revision 1.19
retrieving revision 1.20
diff -2 -u -d -r1.19 -r1.20
--- DBUpdate-to-3.2.mysql.sql	29 Jan 2013 08:55:43 -0000	1.19
+++ DBUpdate-to-3.2.mysql.sql	7 Feb 2013 10:08:32 -0000	1.20
@@ -1,4 +1,4 @@
 # ----------------------------------------------------------
-#  driver: mysql, generated: 2013-01-29 10:07:15
+#  driver: mysql, generated: 2013-02-07 11:23:44
 # ----------------------------------------------------------
 # ----------------------------------------------------------
@@ -23,6 +23,16 @@
 # ----------------------------------------------------------
 ALTER TABLE ticket DROP ticket_answered;
-ALTER TABLE article_flag DROP FOREIGN KEY FK_article_flag_article_id_id;
-ALTER TABLE article_flag DROP FOREIGN KEY FK_article_flag_create_by_id;
+#  MySQL does not create foreign key constraints in MyISAM. Dropping nonexisting constraints in MyISAM works just fine.;
+#  However, if the table is converted to InnoDB, this will result in an error. Therefore, only drop constraints if they exist.;
+SET @FKExists := (SELECT COUNT(*) FROM information_schema.table_constraints WHERE table_schema = DATABASE() AND table_name = 'article_flag' AND constraint_name = 'FK_article_flag_article_id_id');
+SET @FKSQLStatement := IF( @FKExists > 0, 'ALTER TABLE article_flag DROP FOREIGN KEY FK_article_flag_article_id_id', 'SELECT ''INFO: Foreign key constraint FK_article_flag_article_id_id does not exist, skipping.''' );
+PREPARE FKStatement FROM @FKSQLStatement;
+EXECUTE FKStatement;
+#  MySQL does not create foreign key constraints in MyISAM. Dropping nonexisting constraints in MyISAM works just fine.;
+#  However, if the table is converted to InnoDB, this will result in an error. Therefore, only drop constraints if they exist.;
+SET @FKExists := (SELECT COUNT(*) FROM information_schema.table_constraints WHERE table_schema = DATABASE() AND table_name = 'article_flag' AND constraint_name = 'FK_article_flag_create_by_id');
+SET @FKSQLStatement := IF( @FKExists > 0, 'ALTER TABLE article_flag DROP FOREIGN KEY FK_article_flag_create_by_id', 'SELECT ''INFO: Foreign key constraint FK_article_flag_create_by_id does not exist, skipping.''' );
+PREPARE FKStatement FROM @FKSQLStatement;
+EXECUTE FKStatement;
 DROP INDEX article_flag_create_by ON article_flag;
 DROP INDEX article_flag_article_id_article_key ON article_flag;

Author: mg

Index: DBUpdate-to-3.2.oracle.sql
===================================================================
RCS file: /home/cvs/otrs/scripts/DBUpdate-to-3.2.oracle.sql,v
retrieving revision 1.19
retrieving revision 1.20
diff -2 -u -d -r1.19 -r1.20
--- DBUpdate-to-3.2.oracle.sql	29 Jan 2013 08:55:43 -0000	1.19
+++ DBUpdate-to-3.2.oracle.sql	7 Feb 2013 10:08:32 -0000	1.20
@@ -1,4 +1,4 @@
 -- ----------------------------------------------------------
---  driver: oracle, generated: 2013-01-29 10:07:16
+--  driver: oracle, generated: 2013-02-07 11:23:44
 -- ----------------------------------------------------------
 SET DEFINE OFF;
---------------------------------------------------------------------
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.