mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
12 lines
343 B
MySQL
12 lines
343 B
MySQL
|
UPDATE remote
|
||
|
SET remotecanonicalname = SUBSTR(remotecanonicalname, 1, INSTR(remotecanonicalname, ':') - 1)
|
||
|
WHERE INSTR(remotecanonicalname, ':');
|
||
|
|
||
|
DELETE FROM remote
|
||
|
WHERE remoteid NOT IN (
|
||
|
SELECT remoteid FROM (
|
||
|
SELECT MIN(archived), remoteid, remotecanonicalname
|
||
|
FROM remote
|
||
|
GROUP BY remotecanonicalname
|
||
|
)
|
||
|
);
|