3 // Prior to this patch, we issued sessions "web-1", "web-2", etc., up to some
4 // limit. This collapses all the "web-X" sessions into "web" sessions.
6 $session_table = new PhabricatorAuthSession();
7 $conn_w = $session_table->establishConnection('w');
9 foreach (new LiskMigrationIterator($session_table) as $session) {
10 $id = $session->getID();
12 echo pht('Migrating session %d...', $id)."\n";
13 $old_type = $session->getType();
14 $new_type = preg_replace('/-.*$/', '', $old_type);
16 if ($old_type !== $new_type) {
19 'UPDATE %T SET type = %s WHERE id = %d',
20 $session_table->getTableName(),
26 echo pht('Done.')."\n";