mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 11:26:47 +00:00
Make the messagedb a bounded queue at 5000 msgs/device
// FREEBIE
This commit is contained in:
1 parent
2902ea6689
commit
8b941ddd33
1 file changed
+4
@@ -65,4 +65,8 @@
|
||||
<dropNotNullConstraint tableName="messages" columnName="message"/>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="3" author="moxie">
|
||||
<sql>CREATE RULE bounded_message_queue AS ON INSERT TO messages DO ALSO DELETE FROM messages WHERE id IN (SELECT id FROM messages WHERE destination = NEW.destination AND destination_device = NEW.destination_device ORDER BY timestamp DESC OFFSET 5000);</sql>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
Reference in new issue
Block a user