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

INSERT INTO GROUPS (UUID, `NAME`, DESCRIPTION) VALUES((SELECT UUID() FROM dual), 'Moderator group', 'Moderator group');

INSERT INTO BRANCHES (BRANCH_ID, UUID, `NAME`, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(1, (SELECT UUID() FROM dual), 'A cool branch', 'More information', 0, 1, 1);
INSERT INTO BRANCHES (BRANCH_ID, UUID, `NAME`, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(2, (SELECT UUID() FROM dual), 'The second branch', 'More information', 1, 1 ,1);
INSERT INTO BRANCHES (BRANCH_ID, UUID, `NAME`, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(3, (SELECT UUID() FROM dual), 'One more branch', 'More information', 0, 2 ,1);
INSERT INTO BRANCHES (BRANCH_ID, UUID, `NAME`, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(4, (SELECT UUID() FROM dual), '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, ENABLED)
  VALUES((SELECT UUID() FROM dual), 'default', 'default', 'default', 'default', '<EMAIL>', MD5('default'), 'USER_ROLE', '', NOW(), true);
INSERT IGNORE INTO JC_USER_DETAILS (USER_ID, REGISTRATION_DATE, POST_COUNT)
  select ID, NOW(), 0 from USERS where USERNAME = 'default';

SET @admin_group_id := (select GROUP_ID from GROUPS where `NAME`='Administrators');
SET @registered_group_id := (select GROUP_ID from GROUPS where `NAME`='Registered Users');
SET @banned_group_id := (select GROUP_ID from GROUPS where `NAME`='Banned Users');
SET @moderator_group_id := (select GROUP_ID from GROUPS where `NAME`='Moderator group');

SET @admin_group_sid := concat('usergroup:',@admin_group_id);
SET @registered_group_sid := concat('usergroup:',@registered_group_id);
SET @banned_group_sid := concat('usergroup:',@banned_group_id);
SET @moderator_group_sid := concat('usergroup:',@moderator_group_id);

-- Default user is then being added to Registered Users group and to the Moderator group
INSERT IGNORE INTO GROUP_USER_REF select @moderator_group_id, ID from USERS where USERNAME = 'default';
INSERT IGNORE INTO GROUP_USER_REF select @registered_group_id, ID from USERS where USERNAME = 'default';
INSERT IGNORE INTO GROUP_USER_REF select @admin_group_id, ID from USERS where USERNAME = 'default';

INSERT INTO `acl_class` VALUES (1,'BRANCH');<commit_msg>#JC-872 Added banned user data.<commit_after>INSERT INTO SECTIONS (SECTION_ID, UUID, `NAME`, DESCRIPTION, POSITION, COMPONENT_ID) VALUES (1,(SELECT UUID() FROM dual),'Sample section', 'Some description here', 1, 1);
INSERT INTO SECTIONS (SECTION_ID, UUID, `NAME`, DESCRIPTION, POSITION, COMPONENT_ID) VALUES (2,(SELECT UUID() FROM dual),'Another section', 'Whatever else', 2,  1);

INSERT INTO GROUPS (UUID, `NAME`, DESCRIPTION) VALUES((SELECT UUID() FROM dual), 'Moderator group', 'Moderator group');

INSERT INTO BRANCHES (BRANCH_ID, UUID, `NAME`, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(1, (SELECT UUID() FROM dual), 'A cool branch', 'More information', 0, 1, 1);
INSERT INTO BRANCHES (BRANCH_ID, UUID, `NAME`, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(2, (SELECT UUID() FROM dual), 'The second branch', 'More information', 1, 1 ,1);
INSERT INTO BRANCHES (BRANCH_ID, UUID, `NAME`, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(3, (SELECT UUID() FROM dual), 'One more branch', 'More information', 0, 2 ,1);
INSERT INTO BRANCHES (BRANCH_ID, UUID, `NAME`, DESCRIPTION, POSITION, SECTION_ID, MODERATORS_GROUP_ID) VALUES(4, (SELECT UUID() FROM dual), '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, ENABLED)
  VALUES((SELECT UUID() FROM dual), 'default', 'default', 'default', 'default', '<EMAIL>', MD5('default'), 'USER_ROLE', '', NOW(), true);
INSERT IGNORE INTO JC_USER_DETAILS (USER_ID, REGISTRATION_DATE, POST_COUNT)
  select ID, NOW(), 0 from USERS where USERNAME = 'default';

INSERT IGNORE INTO USERS (UUID, FIRST_NAME, LAST_NAME, USERNAME, ENCODED_USERNAME, EMAIL, PASSWORD, ROLE, SALT, REGISTRATION_DATE, ENABLED)
  VALUES((SELECT UUID() FROM dual), 'banned', 'banned', 'banned', 'banned', '<EMAIL>', MD5('banned'), 'USER_ROLE', '', NOW(), true);
INSERT IGNORE INTO JC_USER_DETAILS (USER_ID, REGISTRATION_DATE, POST_COUNT)
  select ID, NOW(), 0 from USERS where USERNAME = 'banned';

SET @admin_group_id := (select GROUP_ID from GROUPS where `NAME`='Administrators');
SET @registered_group_id := (select GROUP_ID from GROUPS where `NAME`='Registered Users');
SET @banned_group_id := (select GROUP_ID from GROUPS where `NAME`='Banned Users');
SET @moderator_group_id := (select GROUP_ID from GROUPS where `NAME`='Moderator group');

SET @admin_group_sid := concat('usergroup:',@admin_group_id);
SET @registered_group_sid := concat('usergroup:',@registered_group_id);
SET @banned_group_sid := concat('usergroup:',@banned_group_id);
SET @moderator_group_sid := concat('usergroup:',@moderator_group_id);

-- Default user is then being added to Registered Users group and to the Moderator group
INSERT IGNORE INTO GROUP_USER_REF select @moderator_group_id, ID from USERS where USERNAME = 'default';
INSERT IGNORE INTO GROUP_USER_REF select @registered_group_id, ID from USERS where USERNAME = 'default';
INSERT IGNORE INTO GROUP_USER_REF select @admin_group_id, ID from USERS where USERNAME = 'default';
INSERT IGNORE INTO GROUP_USER_REF select @banned_group_id, ID from USERS where USERNAME = 'banned';
INSERT IGNORE INTO GROUP_USER_REF select @registered_group_id, ID from USERS where USERNAME = 'banned';

INSERT INTO `acl_class` VALUES (1,'BRANCH');
{'fraction_non_alphanumeric': 0.12761904761904763, 'fraction_numerical': 0.00873015873015873, 'mean_word_length': 7.225848563968668, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '3838500', 'n_tokens_mistral': 2319, 'n_tokens_neox': 2114, 'n_words': 691}