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
|
||||
.DS_Store
|
||||
|
||||
db.sqlite*
|
||||
*.sqlite*
|
||||
|
|
|
@ -8,6 +8,7 @@ async function exportEmails() {
|
|||
const letters = await db
|
||||
.selectFrom("letters")
|
||||
.where("confirmed", "=", 1)
|
||||
.where("subscribed", "=", 1)
|
||||
.groupBy("email")
|
||||
.select(["email", "firstName", "lastName"])
|
||||
.execute();
|
||||
|
|
Reference in a new issue