Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / resources / sql / autopatches / 20190215.daemons.01.dropdataid.php
blob05cc4adfee38fd1f3eb18ea54742402c4be7139d
1 <?php
3 // See T6615. We're about to change the nullability on the "dataID" column,
4 // but it may have a UNIQUE KEY on it. Make sure we get rid of this key first
5 // so we don't run into trouble.
7 // There's no "IF EXISTS" modifier for "ALTER TABLE" so run this as a PHP patch
8 // instead of an SQL patch.
10 $table = new PhabricatorWorkerActiveTask();
11 $conn = $table->establishConnection('w');
13 try {
14 queryfx(
15 $conn,
16 'ALTER TABLE %R DROP KEY %T',
17 $table,
18 'dataID');
19 } catch (AphrontQueryException $ex) {
20 // Ignore.