DB support tracking welcome email sends
This commit is contained in:
parent
3a0293c056
commit
7aa8205115
|
@ -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…
Reference in New Issue