Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Seed de testes
- -- Inserir permissões
- INSERT INTO public."Role"("name")
- VALUES
- ('canCreateRole'),
- ('canCreateUser'),
- ('canCreateProfile'),
- ('canUpdateProfile'),
- ('canReadProfile'),
- ('canDeleteProfile'),
- ('canUpdateProfileRoles'),
- ('canUpdateUser'),
- ('canReadUser'),
- ('canDeleteUser'),
- ('canUpdateRole'),
- ('canReadRole'),
- ('canDeleteRole');
- -- Inserir usuário Admin
- INSERT INTO public."Profile"("name")
- VALUES('Admin');
- -- Atribuir todas as permissões para o perfil criado anteriormente
- INSERT INTO public."_ProfileRoles"("roleId", "profileId")
- SELECT id as roleId, 1 as profileId
- FROM public."Role";
Add Comment
Please, Sign In to add comment