mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 17:30:59 +01:00
25 lines
513 B
PHP
25 lines
513 B
PHP
|
<?php
|
||
|
|
||
|
$table = new PhabricatorProjectColumn();
|
||
|
$conn_w = $table->establishConnection('w');
|
||
|
|
||
|
foreach (new LiskMigrationIterator($table) as $column) {
|
||
|
$id = $column->getID();
|
||
|
|
||
|
echo "Adjusting column {$id}...\n";
|
||
|
if ($column->getSequence() == 0) {
|
||
|
|
||
|
$properties = $column->getProperties();
|
||
|
$properties['isDefault'] = true;
|
||
|
|
||
|
queryfx(
|
||
|
$conn_w,
|
||
|
'UPDATE %T SET properties = %s WHERE id = %d',
|
||
|
$table->getTableName(),
|
||
|
json_encode($properties),
|
||
|
$id);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
echo "Done.\n";
|