onsapp.bootstrap-user.1.0.21.source-code.import.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bootstrap-user Show documentation
Show all versions of bootstrap-user Show documentation
A complete architecture for creating and managing users.
ALTER TABLE permission ALTER id SET DEFAULT NEXTVAL('permission_seq');
INSERT INTO permission (id, name) values (nextval('permission_seq'), 'ROLE_CONSULT_ADDRESS');
INSERT INTO permission (id, name) values (nextval('permission_seq'), 'ROLE_CONSULT_USER');
INSERT INTO permission (id, name) values (nextval('permission_seq'), 'ROLE_CREATE_USER');
INSERT INTO permission (id, name) values (nextval('permission_seq'), 'ROLE_UPDATE_USER');
ALTER TABLE role_group ALTER id SET DEFAULT NEXTVAL('role_group_seq');
INSERT INTO role_group (id, name) values (nextval('role_group_seq'), 'Administrador');
INSERT INTO role_group_permission (id_role_group, id_permission) values ((SELECT id FROM role_group WHERE name = 'Administrador'), (SELECT id FROM permission WHERE name = 'ROLE_CONSULT_ADDRESS'));
INSERT INTO role_group_permission (id_role_group, id_permission) values ((SELECT id FROM role_group WHERE name = 'Administrador'), (SELECT id FROM permission WHERE name = 'ROLE_CONSULT_USER'));
INSERT INTO role_group_permission (id_role_group, id_permission) values ( (SELECT id FROM role_group WHERE name = 'Administrador'), (SELECT id FROM permission WHERE name = 'ROLE_CREATE_USER'));
INSERT INTO role_group_permission (id_role_group, id_permission) values ((SELECT id FROM role_group WHERE name = 'Administrador'), (SELECT id FROM permission WHERE name = 'ROLE_UPDATE_USER'));
ALTER TABLE android_token ALTER id SET DEFAULT NEXTVAL('android_token_seq');
INSERT INTO android_token (id, token) values (nextval('android_token_seq'), '');
ALTER TABLE final_user ALTER id SET DEFAULT NEXTVAL('final_user_seq');
INSERT INTO final_user (id, name, user_name, password, active, android_token_id, reset_password_code) values (nextval('final_user_seq'), 'Jhonathan Corrêa Camacho', '[email protected]' ,'$2a$10$1KyWuwqVUxf3qYdVZA.2j.lsfAQMVfH3kXneaFhTUuJE2/yBE5DwK', TRUE, (SELECT id FROM android_token WHERE id = 1), '');
INSERT INTO final_user_role_group (id_final_user, id_role_group) values ( (SELECT id FROM final_user WHERE user_name = '[email protected]'), (SELECT id FROM role_group WHERE name = 'Administrador'));