-- SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
--
-- SPDX-License-Identifier: AGPL-3.0-or-later

DROP TRIGGER add_default_item_event ON items;
DROP FUNCTION add_default_item_event;

DROP VIEW item_states;

DROP TRIGGER check_item_events_delete ON item_events;
DROP FUNCTION check_item_events_delete;
DROP TRIGGER check_item_events_fsm ON item_events;
DROP FUNCTION check_item_events_fsm;
DROP TABLE item_events;

DROP AGGREGATE item_events_fsm(item_event);
DROP FUNCTION item_events_transition;
DROP TABLE item_events_transitions;
DROP TYPE item_state;
DROP TYPE item_event;
