sqlite statements
diff --git a/src/main/resources/db/sqlite/V1__Initial_version.sql b/src/main/resources/db/sqlite/V1__Initial_version.sql
index 08fbae3..44f64de 100644
--- a/src/main/resources/db/sqlite/V1__Initial_version.sql
+++ b/src/main/resources/db/sqlite/V1__Initial_version.sql
@@ -320,7 +320,7 @@
-- 1. CONCAT(NEW.name,"/")
-- 2. CONCAT(name_path, NEW.name, "/")
-CREATE TRIGGER IF NOT EXISTS insert_data
+CREATE TRIGGER IF NOT EXISTS insert_resource_tree_data
AFTER INSERT ON resource_store
FOR EACH ROW BEGIN
INSERT INTO resource_tree (parent_id, child_id, depth, name_path)
@@ -331,6 +331,7 @@
WHERE child_id = NEW.parent_id;
END;
+
create trigger if not exists delete_policy after delete on resource_store
begin delete from policy_store where target_id=OLD.id; end;