1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Un-breaking the update_phabricator.sh script for those that have data in their chatlog_event table

Summary:
The last commit broke update_phabricator.sh for me when it tried to migrate channel names into its own table.

It's a fairly straight forward patch and I'm almost certain I fixed it correctly. :)

Test Plan: Made small changes, ran update_phabricator.sh, repeat until the errors went away.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5116
This commit is contained in:
epriestley 2013-02-26 05:23:31 -08:00
parent 0f22854823
commit 5de7774412

View file

@ -21,14 +21,15 @@ foreach ($events as $event) {
$event_row = queryfx_one(
$conn_w,
'SELECT channel FROM %T WHERE id = %d',
$event->getTable(),
$event->getChannelID());
$event->getTableName(),
$event->getID());
$event_channel = $event_row['channel'];
$matched = queryfx_one(
$conn_w,
'SELECT * FROM %T WHERE
channelName = %s AND serviceName = %s AND serviceType = %s',
$channel_table->getTableName(),
$event_channel,
'',
'');