mirror of
https://github.com/MeshCore-Beacon/beacon-server.git
synced 2026-10-23 13:22:30 +00:00
fix: cascade channel_messages on packet delete
This commit is contained in:
1 parent
b44cae89d7
commit
c6d23a2b52
1 file changed
+12
@@ -0,0 +1,12 @@
|
||||
-- Copyright 2026 Beacon Contributors
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
-- The packet_hash FK had no ON DELETE action, so packets carrying a channel
|
||||
-- message could never age out and DeleteOldPackets aborted. Match packet_observations.
|
||||
|
||||
ALTER TABLE channel_messages
|
||||
DROP CONSTRAINT IF EXISTS channel_messages_packet_hash_fkey;
|
||||
|
||||
ALTER TABLE channel_messages
|
||||
ADD CONSTRAINT channel_messages_packet_hash_fkey
|
||||
FOREIGN KEY (packet_hash) REFERENCES packets(packet_hash) ON DELETE CASCADE;
|
||||
Reference in new issue
Block a user