Add export script
This commit is contained in:
parent
a74c48bc3b
commit
c9d946ea0e
2 changed files with 2 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -20,4 +20,4 @@ pnpm-debug.log*
|
||||||
# macOS-specific files
|
# macOS-specific files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
db.sqlite*
|
*.sqlite*
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Reference in a new issue