ALTER TABLE public.schema_migrations ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.profiles ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.clusters ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.cluster_vmid_allocators ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.vmid_reservations ENABLE ROW LEVEL SECURITY;

CREATE POLICY profiles_self_select
	ON public.profiles
	FOR SELECT
	USING (id = public.current_profile_id());

CREATE POLICY profiles_self_update
	ON public.profiles
	FOR UPDATE
	USING (id = public.current_profile_id())
	WITH CHECK (id = public.current_profile_id());
