mirror of
https://github.com/status-im/open-bounty.git
synced 2025-01-27 01:41:07 +00:00
DB support tracking welcome email sends
This commit is contained in:
parent
3a0293c056
commit
7aa8205115
1
resources/migrations/20171028204514-welcome-email.up.sql
Normal file
1
resources/migrations/20171028204514-welcome-email.up.sql
Normal file
@ -0,0 +1 @@
|
||||
ALTER TABLE "public"."users" ADD COLUMN "welcome_email_sent" int DEFAULT '0';
|
@ -552,6 +552,16 @@ FROM activity_feed_view
|
||||
ORDER BY updated DESC
|
||||
LIMIT 100;
|
||||
|
||||
-- :name get-new-users-for-welcome-email :? :*
|
||||
-- :doc users who have not been sent a welcome email
|
||||
SELECT
|
||||
id,
|
||||
login,
|
||||
email,
|
||||
name
|
||||
FROM users
|
||||
WHERE welcome_email_sent = 0;
|
||||
|
||||
|
||||
-- :name usage-metrics-by-day :? :*
|
||||
-- :doc data for usage metrics chart
|
||||
|
@ -37,3 +37,8 @@
|
||||
[repo-id]
|
||||
(jdbc/with-db-connection [con-db *db*]
|
||||
(db/get-repo-owner {:repo_id repo-id})))
|
||||
|
||||
(defn get-new-users-for-welcome-email
|
||||
[]
|
||||
(jdbc/with-db-connection [con-db *db*]
|
||||
(db/get-new-users-for-welcome-email)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user