PostgreSQL: Drop unneeded foreign key constraint
authorJeff Janes <jeff.janes@gmail.com>
Mon, 8 Dec 2014 20:27:11 +0000 (12:27 -0800)
committerKunal Mehta <legoktm@gmail.com>
Fri, 30 Jan 2015 21:15:29 +0000 (13:15 -0800)
commit3603b8d772d193641a325610874140bc624b197a
treec6f7bf838d970bd7ffa3f54b9bc81871abc37388
parent576adbca56671e3d4a0059d83dd8961a15dde867
PostgreSQL: Drop unneeded foreign key constraint

Change I1c7f3a84f10df05d6b37dccbad4c8232edf51580 causes
an existing foreign key assumption (under PostgreSQL) to be
violated upon deleting a page.  This foreign key assumption does not
explicitly exist in MySQL, and is not implied via documentation.  So
it was probably never needed in the first place.

Don't create the foreign key constraint in PostgreSQL, and drop it
if it already exists when running update.php.

The constraint was previously created with an implicit name, so
drop the constraint involving the specified column name (rc_cur_id),
rather than hard-coding the name of the constraint itself.

This bug probably exists under Oracle and MSSQL as well, but no attempt
was made to address it there.

Bug: T76254
Change-Id: I2abd650c8ce83c5b725aec0545fff14a927a305a
includes/installer/PostgresUpdater.php
maintenance/postgres/tables.sql