Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / resources / sql / autopatches / 20140115.auth.3.unlimit.php
blob9e5bc7fed31dd0b6f0ca59047e5fbcfbbcc9c647
1 <?php
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) {
17 queryfx(
18 $conn_w,
19 'UPDATE %T SET type = %s WHERE id = %d',
20 $session_table->getTableName(),
21 $new_type,
22 $id);
26 echo pht('Done.')."\n";