From: OverlordQ Date: Wed, 14 Oct 2009 04:28:22 +0000 (+0000) Subject: Followup to r57102, use already existing sequence name so as to not break DB2 and... X-Git-Tag: 1.31.0-rc.0~39292 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=9f5b309aaac51b2c827a56a04c0e5150eaecb4bb;p=lhc%2Fweb%2Fwiklou.git Followup to r57102, use already existing sequence name so as to not break DB2 and PostgreSQL --- diff --git a/includes/Article.php b/includes/Article.php index 6d43612cfc..6de0641828 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -4074,7 +4074,7 @@ class Article { } $insertRows = array(); foreach( $insertCats as $cat ) { - $insertRows[] = array( 'cat_id' => $dbw->nextSequenceValue( 'category_cat_id_val' ), + $insertRows[] = array( 'cat_id' => $dbw->nextSequenceValue( 'category_id_seq' ), 'cat_title' => $cat ); } $dbw->insert( 'category', $insertRows, __METHOD__, 'IGNORE' ); diff --git a/includes/Category.php b/includes/Category.php index b63685e16c..ba52b9444d 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -246,7 +246,7 @@ class Category { } else { # Let's be sure that the row exists in the table. We don't need to # do this if we got the row from the table in initialization! - $seqVal = $dbw->nextSequenceValue( 'category_cat_id_val' ); + $seqVal = $dbw->nextSequenceValue( 'category_id_seq' ); $dbw->insert( 'category', array( 'cat_id' => $seqVal, diff --git a/maintenance/ora/tables.sql b/maintenance/ora/tables.sql index 20ae33a8ea..f7dcad3c06 100644 --- a/maintenance/ora/tables.sql +++ b/maintenance/ora/tables.sql @@ -163,7 +163,7 @@ CREATE UNIQUE INDEX &mw_prefix.categorylinks_u01 ON &mw_prefix.categorylinks (cl CREATE INDEX &mw_prefix.categorylinks_i01 ON &mw_prefix.categorylinks (cl_to,cl_sortkey,cl_from); CREATE INDEX &mw_prefix.categorylinks_i02 ON &mw_prefix.categorylinks (cl_to,cl_timestamp); -CREATE SEQUENCE category_cat_id_val; +CREATE SEQUENCE category_id_seq; CREATE TABLE &mw_prefix.category ( cat_id NUMBER NOT NULL, cat_title VARCHAR2(255) NOT NULL,