Delete item event with item

This commit is contained in:
Simon Bruder 2024-07-25 19:51:56 +02:00
parent f33f3c8b9c
commit c4107266c4
Signed by: simon
GPG key ID: 347FF8699CDA0776
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,9 @@
-- SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
--
-- SPDX-License-Identifier: AGPL-3.0-or-later
ALTER TABLE item_events
DROP CONSTRAINT item_events_item_fkey;
ALTER TABLE item_events
ADD CONSTRAINT item_events_item_fkey FOREIGN KEY (item) REFERENCES items(id);

View file

@ -0,0 +1,9 @@
-- SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
--
-- SPDX-License-Identifier: AGPL-3.0-or-later
ALTER TABLE item_events
DROP CONSTRAINT item_events_item_fkey;
ALTER TABLE item_events
ADD CONSTRAINT item_events_item_fkey FOREIGN KEY (item) REFERENCES items(id) ON DELETE CASCADE;