mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 19:32:40 +01:00
22 lines
533 B
PHP
22 lines
533 B
PHP
|
<?php
|
||
|
|
||
|
// See T6615. We're about to change the nullability on the "dataID" column,
|
||
|
// but it may have a UNIQUE KEY on it. Make sure we get rid of this key first
|
||
|
// so we don't run into trouble.
|
||
|
|
||
|
// There's no "IF EXISTS" modifier for "ALTER TABLE" so run this as a PHP patch
|
||
|
// instead of an SQL patch.
|
||
|
|
||
|
$table = new PhabricatorWorkerActiveTask();
|
||
|
$conn = $table->establishConnection('w');
|
||
|
|
||
|
try {
|
||
|
queryfx(
|
||
|
$conn,
|
||
|
'ALTER TABLE %R DROP KEY %T',
|
||
|
$table,
|
||
|
'dataID');
|
||
|
} catch (AphrontQueryException $ex) {
|
||
|
// Ignore.
|
||
|
}
|