-- 이미 존재한다는 (insert 시) 에러메세지나 , 존재하지 않는다는 (delete 시) 에러메세지는 무시하셔도 무방합니다.
-- service - active transaction 삭제
-- auth_resource3
DELETE FROM public.auth_resource3 WHERE name = 'menu|Services|Active Transaction';

-- menu_meta
DELETE FROM public.menu_meta WHERE id = 26;


-- service - overview 추가
-- auth_resource2
INSERT INTO public.auth_resource2 (access_type, name, parent_id, type) VALUES (4, 'Overview',              (select id from auth_resource2 where type='menu' and name='Services'), 'menu');

-- auth_resource3
INSERT INTO public.auth_resource3 (name, is_deleted, tenant_id) VALUES ('menu|Services|Overview', false, null);

-- menu_meta
INSERT INTO public.menu_meta (id, description, icon, "position", url, auth_resource3_id, scope_level) VALUES (22, 'ServiceOverview', NULL, 1, 'overviewServices', (select id from auth_resource3 where name='menu|Services|Overview'), 0);

-- user_permission2
INSERT INTO public.user_permission2 VALUES (nextval('hibernate_sequence'), now(), now(), false, 4, (SELECT id FROM auth_resource3 WHERE NAME = 'menu|Services|Overview'), 'owner');