0

How can I change the email alert frequency settings for every user?

Since I haven't launched my Askbot site yet, but I have thousands of users in my database, I want to change all their email alert frequency settings to the default values.

How can I do that with Django ORM or MySql?

Thanks!

siovene's avatar
431
siovene
asked 2012-10-31 14:39:27 -0500
edit flag offensive 0 remove flag close merge delete

Comments

I can see that it's in askbot_emailfeedsetting, but it looks complicated.

siovene's avatar siovene (2012-10-31 14:41:07 -0500) edit
add a comment see more comments

1 Answer

2

I've got it!

**mysql> update askbot_emailfeedsetting set frequency='i' where feed_type='m_and_c';
Query OK, 2711 rows affected (0.09 sec)
Rows matched: 2713  Changed: 2711  Warnings: 0

mysql> update askbot_emailfeedsetting set frequency='i' where feed_type='q_ask';
Query OK, 2709 rows affected (0.09 sec)
Rows matched: 2712  Changed: 2709  Warnings: 0

mysql> update askbot_emailfeedsetting set frequency='n' where feed_type='q_all';
Query OK, 2711 rows affected (0.08 sec)
Rows matched: 2712  Changed: 2711  Warnings: 0

mysql> update askbot_emailfeedsetting set frequency='i' where feed_type='q_sel';
Query OK, 2711 rows affected (0.04 sec)
Rows matched: 2712  Changed: 2711  Warnings: 0

mysql> update askbot_emailfeedsetting set frequency='d' where feed_type='q_ans';
Query OK, 2 rows affected (0.08 sec)
Rows matched: 2712  Changed: 2  Warnings: 0
siovene's avatar
431
siovene
answered 2012-10-31 14:47:38 -0500
edit flag offensive 0 remove flag delete link

Comments

1

They should be added automatically actually. There is a function user.add_missing_askbot_subscriptions() which will set the default values.

Evgeny's avatar Evgeny (2012-10-31 15:07:07 -0500) edit
1

Yeah, but mine weren't missing. I just didn't set them to my liking, and wanted to change them.

siovene's avatar siovene (2012-10-31 15:30:28 -0500) edit
add a comment see more comments