diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 01:35:06 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 02:11:48 +0200 |
commit | 1a64deeb894dc95e2645a75771732c6cc53a79ad (patch) | |
tree | 1b9df4838f894577a09b9b260151756272efeb53 /flakes/etherpad-lite/etherpad_cleanup.sql | |
parent | fa25ffd4583cc362075cd5e1b4130f33306103f0 (diff) | |
download | Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip |
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them
contained personnal information about users. All thos changes got
stashed into a single commit (history is kept in a different place) and
private information was moved in a separate private repository
Diffstat (limited to 'flakes/etherpad-lite/etherpad_cleanup.sql')
-rw-r--r-- | flakes/etherpad-lite/etherpad_cleanup.sql | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/flakes/etherpad-lite/etherpad_cleanup.sql b/flakes/etherpad-lite/etherpad_cleanup.sql new file mode 100644 index 0000000..4002715 --- /dev/null +++ b/flakes/etherpad-lite/etherpad_cleanup.sql | |||
@@ -0,0 +1,30 @@ | |||
1 | DO $$ | ||
2 | DECLARE todelete record; | ||
3 | BEGIN | ||
4 | FOR todelete IN | ||
5 | select split_part(key, ':', 4) as k from store where key like 'mypads:jobqueue:deletePad:%' | ||
6 | LOOP | ||
7 | select * from store where key in (select 'readonly2pad:' || split_part(value, '"', 2) from store where key = 'pad2readonly:' || todelete.k); | ||
8 | select * from store where key = 'pad2readonly:' || todelete.k; | ||
9 | select * from store where key like 'pad:' || todelete.k || ':revs:%'; | ||
10 | select * from store where key like 'pad:' || todelete.k || ':chats:%'; | ||
11 | END LOOP; | ||
12 | END $$ | ||
13 | |||
14 | -- /nix/store/1i77431p6996lbyflpkb803zsiaj24kx-etherpad-lite-1.8.3/node_modules/ep_mypads/scripts/mypads-jobqueue-minion.js | ||
15 | for toDelete in | ||
16 | select split_part(key, ':', 4) from store where key like 'mypads:jobqueue:deletePad:%' | ||
17 | loop | ||
18 | select * from store where key in (select 'readonly2pad:' || split_part(value, '"', 2) from store where key = 'pad2readonly:' || toDelete); | ||
19 | select * from store where key = 'pad2readonly:' || toDelete; | ||
20 | select * from store where key like 'pad:' || toDelete || ':revs:%'; | ||
21 | select * from store where key like 'pad:' || toDelete || ':chats:%'; | ||
22 | end loop | ||
23 | --select * from store where key in (select 'pad2readonly:' || split_part(key, ':', 4) from store where key like 'mypads:jobqueue:deletePad:%'); | ||
24 | -- | ||
25 | --delete from store where key in (select 'readonly2pad:' || split_part(value, '"', 2) from store where key in (select 'pad2readonly:' || split_part(key, ':', 4) from store where key like 'mypads:jobqueue:deletePad:%')) | ||
26 | --delete from store where key in (select 'pad2readonly:' || split_part(key, ':', 4) from store where key like 'mypads:jobqueue:deletePad:%'); | ||
27 | --delete from store where key like any(select 'pad:' || split_part(key, ':', 4) || ':revs:%' from store where key like 'mypads:jobqueue:deletePad:%'); | ||
28 | --delete from store where key like any(select 'pad:' || split_part(key, ':', 4) || ':chats:%' from store where key like 'mypads:jobqueue:deletePad:%'); | ||
29 | --delete from store where key like 'mypads:jobqueue:deletePad:%'; | ||
30 | |||