Add export script

This commit is contained in:
Ondřej 2024-03-01 19:43:39 +01:00
parent a74c48bc3b
commit c9d946ea0e
2 changed files with 2 additions and 1 deletions

2
.gitignore vendored
View file

@ -20,4 +20,4 @@ pnpm-debug.log*
# macOS-specific files # macOS-specific files
.DS_Store .DS_Store
db.sqlite* *.sqlite*

View file

@ -8,6 +8,7 @@ async function exportEmails() {
const letters = await db const letters = await db
.selectFrom("letters") .selectFrom("letters")
.where("confirmed", "=", 1) .where("confirmed", "=", 1)
.where("subscribed", "=", 1)
.groupBy("email") .groupBy("email")
.select(["email", "firstName", "lastName"]) .select(["email", "firstName", "lastName"])
.execute(); .execute();