From aeb1c23a2f2ad276e1051b81ae2b5c844e86c322 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 19 Oct 2010 12:23:49 -0700 Subject: [PATCH] fix index drop on pg --- lib/pgsqlschema.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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. *