]> git.mjollnir.org Git - moodle.git/commitdiff
Changed PG rename_index() to use the old ALTER TABLE ... RENAME TO syntax
authorstronk7 <stronk7>
Tue, 3 Oct 2006 15:00:55 +0000 (15:00 +0000)
committerstronk7 <stronk7>
Tue, 3 Oct 2006 15:00:55 +0000 (15:00 +0000)
(pretty strange syntax, but seems to work)

lib/xmldb/classes/generators/postgres7/postgres7.class.php

index 2246750cae9ff848b52f7406147b1fc4824ce180..e24e7c48f19f620182c3dcdcd4cf9df9fe007e0a 100644 (file)
@@ -47,6 +47,9 @@ class XMLDBpostgres7 extends XMLDBgenerator {
 
     var $enum_inline_code = false; //Does the generator need to add inline code in the column definition
 
+    var $rename_index_sql = 'ALTER TABLE OLDINDEXNAME RENAME TO NEWINDEXNAME'; //SQL sentence to rename one index
+                                      //TABLENAME, OLDINDEXNAME, NEWINDEXNAME are dinamically replaced
+
     var $rename_key_sql = null; //SQL sentence to rename one key (PostgreSQL doesn't support this!)
                                           //TABLENAME, OLDKEYNAME, NEWKEYNAME are dinamically replaced