-- Update your user role to Super Admin
update auth.users set raw_app_meta_data='{"provider": "email", "providers": ["email"], "role": "super-admin" }' where email='test2@test.ee';

-- To create a new company user you need rows in Roles table
INSERT INTO medreport.roles (name, hierarchy_level)
VALUES 
  ('owner', 1),
  ('member', 2);

-- Add role permissions
insert into medreport.role_permissions (role, permission) values
('owner', 'roles.manage'),
('owner', 'billing.manage'),
('owner', 'settings.manage'),
('owner', 'members.manage'),
('owner', 'invites.manage');