Fix PostgreSQL patch-add-3d.sql by replacing it
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 15 Sep 2017 16:12:21 +0000 (12:12 -0400)
committerTim Starling <tstarling@wikimedia.org>
Thu, 12 Oct 2017 03:24:56 +0000 (03:24 +0000)
commit5ba7fb251e0ac09f3171f41320c2c1b60b8b983c
tree1438d5a4ef63a1bb0cf4dd670f2cb6e585205292
parent009764c0aef9827ee470120ecb294cc0cd56de86
Fix PostgreSQL patch-add-3d.sql by replacing it

Follows-up 6260545feea2f5d05ae8. (T157348)

If updates are run for the first time on an installation that already
has '3D' in the enum (e.g. because it's a fresh install), the update
fails.

Instead of blindly running a patch file, we instead add a method that
checks whether the enum type already contains the value before adding
it.

Bug: T177417
Change-Id: Iad10cb88cf1cb35cfb95ce98a556b33688158a88
includes/installer/PostgresUpdater.php
maintenance/postgres/archives/patch-add-3d.sql [deleted file]