<commit_before>INSERT INTO SECTIONS (SECTION_ID, UUID, NAME, DESCRIPTION, POSITION, COMPONENT_ID) VALUES (1,'1','Sample section', 'Some description here', 1, 1);
INSERT INTO SECTIONS (SECTION_ID, UUID, NAME, DESCRIPTION, POSITION, COMPONENT_ID) VALUES (2,'2','Another section', 'Whatever else', 2,  1);

INSERT INTO GROUPS (GROUP_ID, UUID, NAME, DESCRIPTION) VALUES(1, '1', 'Moderator group', 'Moderator group');

INSERT INTO BRANCHES (BRANCH_ID, UUID, NAME, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(1, '3', 'A cool branch', 'More information', 0, 1, 1);
INSERT INTO BRANCHES (BRANCH_ID, UUID, NAME, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(2, '4', 'The second branch', 'More information', 1, 1 ,1);
INSERT INTO BRANCHES (BRANCH_ID, UUID, NAME, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(3, '5', 'One more branch', 'More information', 0, 2 ,1);
INSERT INTO BRANCHES (BRANCH_ID, UUID, NAME, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(4, '6', 'The last, but not least', 'More information', 1, 2 ,1);

INSERT INTO `acl_class` VALUES (1,'BRANCH');
INSERT INTO `acl_class` VALUES (2,'GROUP');

INSERT INTO `acl_sid` VALUES (1,0,'usergroup:11');
INSERT INTO `acl_sid` VALUES (3,0,'usergroup:12');
INSERT INTO `acl_sid` VALUES (2,0,'usergroup:13');
INSERT INTO `acl_sid` VALUES (4,0,'usergroup:1');
INSERT INTO `acl_sid` VALUES (5,1,'user:anonymousUser');

INSERT INTO `acl_object_identity` VALUES (1,1,1,NULL,1,1);
INSERT INTO `acl_object_identity` VALUES (2,1,2,NULL,1,1);
INSERT INTO `acl_object_identity` VALUES (3,1,3,NULL,1,1);
INSERT INTO `acl_object_identity` VALUES (4,1,4,NULL,1,1);
INSERT INTO `acl_object_identity` VALUES (5,2,11,NULL,1,1);<commit_msg>#JC-954 Added script to the sample scripts in order to create a default user so that it's faster to deploy and try the app and no need to register a user every time DB is dropped.<commit_after>INSERT INTO SECTIONS (SECTION_ID, UUID, NAME, DESCRIPTION, POSITION, COMPONENT_ID) VALUES (1,'1','Sample section', 'Some description here', 1, 1);
INSERT INTO SECTIONS (SECTION_ID, UUID, NAME, DESCRIPTION, POSITION, COMPONENT_ID) VALUES (2,'2','Another section', 'Whatever else', 2,  1);

INSERT INTO GROUPS (GROUP_ID, UUID, NAME, DESCRIPTION) VALUES(1, '1', 'Moderator group', 'Moderator group');

INSERT INTO BRANCHES (BRANCH_ID, UUID, NAME, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(1, '3', 'A cool branch', 'More information', 0, 1, 1);
INSERT INTO BRANCHES (BRANCH_ID, UUID, NAME, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(2, '4', 'The second branch', 'More information', 1, 1 ,1);
INSERT INTO BRANCHES (BRANCH_ID, UUID, NAME, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(3, '5', 'One more branch', 'More information', 0, 2 ,1);
INSERT INTO BRANCHES (BRANCH_ID, UUID, NAME, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(4, '6', 'The last, but not least', 'More information', 1, 2 ,1);

-- Creates a default user with default/default credentials to be able to log in without manual registration
INSERT IGNORE INTO USERS (UUID, FIRST_NAME, LAST_NAME, USERNAME, ENCODED_USERNAME, EMAIL, PASSWORD, ROLE, SALT, REGISTRATION_DATE)
  VALUES('7241p12-2720-99h0-r210-ed26491k86j7', 'default', 'default', 'default', 'default', '<EMAIL>', MD5('default'), 'USER_ROLE', '', NOW());
INSERT IGNORE INTO JC_USER_DETAILS (USER_ID, REGISTRATION_DATE, POST_COUNT, ENABLED)
  select ID, NOW(), 0, true from USERS where USERNAME = 'default';
-- Default user is then being added to Registered Users group and to the Moderator group
INSERT IGNORE INTO GROUP_USER_REF select 1, ID from USERS where USERNAME = 'default';
INSERT IGNORE INTO GROUP_USER_REF select 11, ID from USERS where USERNAME = 'default';

INSERT INTO `acl_class` VALUES (1,'BRANCH');
INSERT INTO `acl_class` VALUES (2,'GROUP');

INSERT INTO `acl_sid` VALUES (1,0,'usergroup:11');
INSERT INTO `acl_sid` VALUES (3,0,'usergroup:12');
INSERT INTO `acl_sid` VALUES (2,0,'usergroup:13');
INSERT INTO `acl_sid` VALUES (4,0,'usergroup:1');
INSERT INTO `acl_sid` VALUES (5,1,'user:anonymousUser');

INSERT INTO `acl_object_identity` VALUES (1,1,1,NULL,1,1);
INSERT INTO `acl_object_identity` VALUES (2,1,2,NULL,1,1);
INSERT INTO `acl_object_identity` VALUES (3,1,3,NULL,1,1);
INSERT INTO `acl_object_identity` VALUES (4,1,4,NULL,1,1);
INSERT INTO `acl_object_identity` VALUES (5,2,11,NULL,1,1);
{'fraction_non_alphanumeric': 0.14080071974808817, 'fraction_numerical': 0.04093567251461988, 'mean_word_length': 7.235185185185185, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7490674', 'n_tokens_mistral': 1787, 'n_tokens_neox': 1571, 'n_words': 506}