2
0
Fork 0

chore: add script to extract opt-in helpers from database dump

This commit is contained in:
Luca 2024-05-12 19:18:20 +02:00
parent d9b5dfe5d6
commit b685ad800f
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
#!/bin/sh
jq '[
JOIN(
INDEX(
.[] | select(
.model == "app.helper"
);
.pk | tostring
);
.[] | select(
.model == "feedback.feedback"
and .fields.next_year
);
.pk | tostring;
.[0].fields as $feedback
| .[1].fields as $helper
| {
"name": $helper.name,
"next_year": $feedback.next_year,
"phone": $helper.phone,
}
)
]'