]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix index drop on pg
authorBrion Vibber <brion@pobox.com>
Tue, 19 Oct 2010 19:23:49 +0000 (12:23 -0700)
committerBrion Vibber <brion@pobox.com>
Tue, 19 Oct 2010 19:23:49 +0000 (12:23 -0700)
lib/pgsqlschema.php

index 599f7ffca2778cd05413f7d7dfa78dc25a9a1c7d..d50e35f660f65587c89809be2f85198d0c80b04f 100644 (file)
@@ -334,6 +334,20 @@ class PgsqlSchema extends Schema
         }
     }
 
+    /**
+     * Append an SQL statement to drop an index from a table.
+     * Note that in PostgreSQL, index names are DB-unique.
+     *
+     * @param array $statements
+     * @param string $table
+     * @param string $name
+     * @param array $def
+     */
+    function appendDropIndex(array &$statements, $table, $name)
+    {
+        $statements[] = "DROP INDEX $name";
+    }
+
     /**
      * Quote a db/table/column identifier if necessary.
      *