PostgreSQL: Use correct PK name so patch-site_stats-pk.sql isn't run when not needed
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 14 Nov 2017 17:53:02 +0000 (12:53 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Tue, 14 Nov 2017 17:54:28 +0000 (12:54 -0500)
PostgreSQL names this primary key "site_stats_pkey" by default, not
"PRIMARY".

Bug: T180508
Change-Id: I626e46186376bc2a13157664c3ea6e097fa5e650

includes/installer/PostgresUpdater.php

index 1f17fec..91f569f 100644 (file)
@@ -481,7 +481,7 @@ class PostgresUpdater extends DatabaseUpdater {
                        [ 'changeNullableField', 'protected_titles', 'pt_reason', 'NOT NULL', true ],
                        [ 'addPgField', 'protected_titles', 'pt_reason_id', 'INTEGER NOT NULL DEFAULT 0' ],
                        [ 'addTable', 'comment', 'patch-comment-table.sql' ],
-                       [ 'addIndex', 'site_stats', 'PRIMARY', 'patch-site_stats-pk.sql' ],
+                       [ 'addIndex', 'site_stats', 'site_stats_pkey', 'patch-site_stats-pk.sql' ],
                ];
        }