Confluence 3.5.5: Where are the Emails settings stored in database?

(environment.txt) (environment.txt) We'd like to see how the profile / settings / email settings are stored in the database. For example, when the "Subscribe to network", "autowatch", "subscribe to daily updates", "Subscribe to all blog posts", and "Notify on my actions" boxes are checked, how this information is saved in the database. Could you advise which table(s) to look at?

Also, are there more options / granularities offered for "Subscribe to network"? For example, notifications for page update, notifications for attachment added...?

3 answers

1 vote
Colin Goudie Community Champion Jun 23, 2012

These are held in the os_propertyentry table.

e.g. the Daily summary can be found like

select * from os_propertyentry where entity_key like 'confluence.prefs.daily.summary.receive.updates';

For the full list of keys take a look in the confluence source under

confluence-project/confluence-core/confluence/src/java/com/atlassian/confluence/user/UserPreferencesKeys.java

The current list is

PROPERTY_USER_SUBSCRIBE_TO_DIGEST = "confluence.prefs.email.notify"
PROPERTY_USER_NOTIFY_FOR_MY_OWN_ACTIONS = "confluence.prefs.notify.for.my.own.actions"
PROPERTY_USER_WATCH_MY_OWN_CONTENT = "confluence.prefs.watch.my.own.content"
PROPERTY_USER_EMAIL_SHOW_DIFF = "confluence.prefs.email.show.diff"
PROPERTY_USER_NOTIFY_ON_NEW_FOLLOWERS = "confluence.prefs.notify.on.new.followers"
PROPERTY_USER_SUBSCRIBE_TO_RECOMMENDED_UPDATES = "confluence.prefs.daily.summary.receive.updates"
PROPERTY_USER_SUBSCRIBE_TO_RECOMMENDED_UPDATES_SET = "confluence.prefs.daily.summary.receive.updates.set"
PROPERTY_USER_RECOMMENDED_UPDATES_SCHEDULE = "confluence.prefs.daily.summary.schedule"


Hi,

There's a page describing the Confluence database schema at http://confluence.atlassian.com/display/DOC/Confluence+Data+Model , but it looks a bit out of date.

The network information is stored in a table called FOLLOW_CONNECTIONS:

mysql> describe FOLLOW_CONNECTIONS;
+--------------+--------------+------+-----+---------+-------+
| Field        | Type         | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+-------+
| CONNECTIONID | bigint(20)   | NO   | PRI | NULL    |       |
| FOLLOWER     | varchar(255) | NO   | MUL | NULL    |       |
| FOLLOWEE     | varchar(255) | NO   | MUL | NULL    |       |
+--------------+--------------+------+-----+---------+-------+

and the page and space watches are stored in a table called NOTIFICATIONS:

mysql> describe NOTIFICATIONS;
+----------------+--------------+------+-----+---------+-------+
| Field          | Type         | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+-------+
| NOTIFICATIONID | bigint(20)   | NO   | PRI | NULL    |       |
| PAGEID         | bigint(20)   | YES  | MUL | NULL    |       |
| SPACEID        | bigint(20)   | YES  | MUL | NULL    |       |
| USERNAME       | varchar(255) | NO   |     | NULL    |       |
| CREATOR        | varchar(255) | YES  |     | NULL    |       |
| CREATIONDATE   | datetime     | YES  |     | NULL    |       |
| LASTMODIFIER   | varchar(255) | YES  |     | NULL    |       |
| LASTMODDATE    | datetime     | YES  |     | NULL    |       |
| DIGEST         | bit(1)       | YES  |     | NULL    |       |
| NETWORK        | bit(1)       | YES  |     | NULL    |       |
| CONTENTTYPE    | varchar(255) | YES  |     | NULL    |       |
+----------------+--------------+------+-----+---------+-------+

The only granularity I know of in network subscriptions is by hacking the RSS feed. Details on this are available at http://confluence.atlassian.com/display/DOC/Subscribing+to+a+Network+RSS+Feed

Hope that helps,

Andrew.

Yep, it's in os_propertyentry table as mentioned above. In addition, both global email and space email configurations are stored in Confluence BANDANA table. The following query will display the settings:

SELECT * FROM BANDANA where BANDANAKEY='atlassian.confluence.space.mailaccounts';

SELECT * FROM BANDANA where BANDANAKEY='atlassian.confluence.smtp.mail.accounts';

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

398 views 17 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you