Advertisement
cesarMarcal

Seed Dr Cash

Sep 4th, 2024
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.75 KB | None | 0 0
  1. INSERT INTO public."Role"("name")
  2. VALUES
  3.   ('canCreateRole'),
  4.   ('canCreateUser'),
  5.   ('canCreateProfile'),
  6.   ('canUpdateProfile'),
  7.   ('canReadProfile'),
  8.   ('canDeleteProfile'),
  9.   ('canUpdateProfileRoles'),
  10.   ('canUpdateUser'),
  11.   ('canReadUser'),
  12.   ('canDeleteUser'),
  13.   ('canUpdateRole'),
  14.   ('canReadRole'),
  15.   ('canDeleteRole');
  16.  
  17. INSERT INTO public."Profile"("name")
  18.     VALUES('Admin');
  19.  
  20. INSERT INTO public."_ProfileRoles"("roleId", "profileId")
  21.     SELECT id AS roleId, 1 AS profileId
  22.     FROM public."Role";
  23.  
  24. INSERT INTO public."User" ("id", "phoneNumber", "name", "cpf", "email", "password", "profileId")
  25.     VALUES ('f6c2c58a-0f11-49a8-a518-1d498b8a1010', '67996585812', 'César Admin', '30030030030', 'ceshen.marcal@gmail.com', '12345678', 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement