path: root/util/updates/update_2.11.sql
diff options
Diffstat (limited to 'util/updates/update_2.11.sql')
1 files changed, 5 insertions, 3 deletions
diff --git a/util/updates/update_2.11.sql b/util/updates/update_2.11.sql
index c59b2815..396ea540 100644
--- a/util/updates/update_2.11.sql
+++ b/util/updates/update_2.11.sql
@@ -11,12 +11,14 @@ CREATE TABLE notifications (
ntype notification_ntype NOT NULL,
ltype notification_ltype NOT NULL,
iid integer NOT NULL,
- subid integer
+ subid integer,
+ c_title text NOT NULL,
+ c_byuser integer REFERENCES users (id)
-- convert the "unread messages" count into notifications
-INSERT INTO notifications (uid, date, ntype, ltype, iid, subid)
- SELECT tb.iid,, 'pm', 't',, tp.num
+INSERT INTO notifications (uid, date, ntype, ltype, iid, subid, c_title, c_byuser)
+ SELECT tb.iid,, 'pm', 't',, tp.num, t.title, tp.uid
FROM threads_boards tb
JOIN threads t ON = tb.tid
JOIN threads_posts tp ON tp.tid = AND tp.num = COALESCE(tb.lastread, 1)