From: Brion Vibber Date: Tue, 19 Oct 2010 19:23:49 +0000 (-0700) Subject: fix index drop on pg X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aeb1c23a2f2ad276e1051b81ae2b5c844e86c322;p=quix0rs-gnu-social.git fix index drop on pg --- diff --git a/lib/pgsqlschema.php b/lib/pgsqlschema.php index 599f7ffca2..d50e35f660 100644 --- a/lib/pgsqlschema.php +++ b/lib/pgsqlschema.php @@ -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. *