Delete item event with item
This commit is contained in:
parent
8eb59dd7c7
commit
96ec85009a
|
@ -0,0 +1,13 @@
|
||||||
|
-- SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
|
||||||
|
--
|
||||||
|
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
COMMIT;
|
13
migrations/20240725174404_delete_item_event_with_item.up.sql
Normal file
13
migrations/20240725174404_delete_item_event_with_item.up.sql
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
-- SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
|
||||||
|
--
|
||||||
|
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
COMMIT;
|
Loading…
Reference in a new issue