<commit_before>
CREATE TABLE prefix_data (
  id SERIAL PRIMARY KEY,
  course integer NOT NULL default '0',
  name varchar(255) NOT NULL default '',
  intro text NOT NULL default '',
  ratings integer NOT NULL default '0',
  comments integer NOT NULL default '0',
  timeavailablefrom integer NOT NULL default '0',
  timeavailableto integer NOT NULL default '0',
  timeviewfrom integer NOT NULL default '0',
  timeviewto integer NOT NULL default '0',
  participants integer NOT NULL default '0',
  requiredentries integer NOT NULL default '0',
  requiredentriestoview integer NOT NULL default '0',
  maxentries integer NOT NULL default '0',
  rssarticles integer NOT NULL default '0',
  singletemplate text NOT NULL default '',
  listtemplate text NOT NULL default '',
  listtemplateheader text NOT NULL default '',
  listtemplatefooter text NOT NULL default '',
  addtemplate text NOT NULL default '',
  rsstemplate text NOT NULL default '',
  rsstitletemplate text NOT NULL default '',
  csstemplate text NOT NULL default '',
  approval integer NOT NULL default '0',
  scale integer NOT NULL default '0',
  assessed integer NOT NULL default '0',
  assesspublic integer NOT NULL default '0',
  defaultsort integer NOT NULL default '0',
  defaultsortdir integer NOT NULL default '0',
  editany integer NOT NULL default '0'
);



CREATE TABLE prefix_data_content (
  id SERIAL PRIMARY KEY,
  fieldid integer NOT NULL default '0',
  recordid integer NOT NULL default '0',
  content text NOT NULL default '',
  content1 text NOT NULL default '',
  content2 text NOT NULL default '',
  content3 text NOT NULL default '',
  content4 text NOT NULL default ''
);


CREATE TABLE prefix_data_fields (
  id SERIAL PRIMARY KEY,
  dataid integer NOT NULL default '0',
  type varchar(255) NOT NULL default '',
  name varchar(255) NOT NULL default '',
  description text NOT NULL default '',
  param1  text NOT NULL default '',
  param2  text NOT NULL default '',
  param3  text NOT NULL default '',
  param4  text NOT NULL default '',
  param5  text NOT NULL default '',
  param6  text NOT NULL default '',
  param7  text NOT NULL default '',
  param8  text NOT NULL default '',
  param9  text NOT NULL default '',
  param10 text NOT NULL default ''
);

CREATE TABLE prefix_data_records (
  id SERIAL PRIMARY KEY,
  userid integer NOT NULL default '0',
  groupid integer NOT NULL default '0',
  dataid integer NOT NULL default '0',
  timecreated integer NOT NULL default '0',
  timemodified integer NOT NULL default '0',
  approved integer NOT NULL default '0'
);


CREATE TABLE prefix_data_comments (
  id SERIAL PRIMARY KEY,
  userid integer NOT NULL default '0',
  recordid integer NOT NULL default '0',
  content text NOT NULL default '',
  created integer NOT NULL default '0',
  modified integer NOT NULL default '0'
);


CREATE TABLE prefix_data_ratings (
  id SERIAL PRIMARY KEY,
  userid integer NOT NULL default '0',
  recordid integer NOT NULL default '0',
  rating integer NOT NULL default '0'
);

# Roles tables

CREATE TABLE prefix_roles (
  `id` SERIAL PRIMARY KEY,
  `name` varchar(255) NOT NULL default '',
  `description` text NOT NULL default '',
  `priority` decimal(2,2) NOT NULL default '0',
);

CREATE TABLE prefix_contexts (
  `id` SERIAL PRIMARY KEY,
  `system` int(1) NOT NULL default '0',
  `metacourseid` int(10) NOT NULL default '0',
  `coursecatid` int(10) NOT NULL default '0',
  `courseid` int(10) NOT NULL default '0',
  `moduleinstance` int(10) NOT NULL default '0',
  `userid` int(10) NOT NULL default '0',
);

CREATE TABLE prefix_role_assignments (
  `id` SERIAL PRIMARY KEY,
  `roldid` int(10) NOT NULL default '0',
  `contextid` int(10) NOT NULL default '0',
  `userid` int(10) NOT NULL default '0',
  `groupid` int(10) NOT NULL default '0',
  `timestart` int(10) NOT NULL default '0',
  `timeend` int(10) NOT NULL default '0',
  `timemodified` int(10) NOT NULL default '0',
  `modifierid` int(10) NOT NULL default '0',
);

CREATE TABLE prefix_capability_overrides (
  `id` SERIAL PRIMARY KEY,
  `contextid` int(10) NOT NULL default '0',
  `roleid` int(10) NOT NULL default '0',
  `module` varchar(255) NOT NULL default '',
  `capability` varchar(255) NOT NULL default '',
  `allow` int(1) NOT NULL default '0',
  `priority` double(2,2) NOT NULL default '0',
  `timemodified` int(10) NOT NULL default '0',
  `modifierid` int(10) NOT NULL default '0',
);

CREATE TABLE prefix_role_capabilities (
  `id` SERIAL PRIMARY KEY,
  `module` varchar(255) NOT NULL default '',
  `capability` varchar(255) NOT NULL default '',
  `allow` int(1) NOT NULL default '0',
);

INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'view', 'data', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'add', 'data', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'update', 'data', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'record delete', 'data', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'fields add', 'data_fields', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'fields update', 'data_fields', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'templates saved', 'data', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'templates def', 'data', 'name');<commit_msg>these tables should not be there,,<commit_after>
CREATE TABLE prefix_data (
  id SERIAL PRIMARY KEY,
  course integer NOT NULL default '0',
  name varchar(255) NOT NULL default '',
  intro text NOT NULL default '',
  ratings integer NOT NULL default '0',
  comments integer NOT NULL default '0',
  timeavailablefrom integer NOT NULL default '0',
  timeavailableto integer NOT NULL default '0',
  timeviewfrom integer NOT NULL default '0',
  timeviewto integer NOT NULL default '0',
  participants integer NOT NULL default '0',
  requiredentries integer NOT NULL default '0',
  requiredentriestoview integer NOT NULL default '0',
  maxentries integer NOT NULL default '0',
  rssarticles integer NOT NULL default '0',
  singletemplate text NOT NULL default '',
  listtemplate text NOT NULL default '',
  listtemplateheader text NOT NULL default '',
  listtemplatefooter text NOT NULL default '',
  addtemplate text NOT NULL default '',
  rsstemplate text NOT NULL default '',
  rsstitletemplate text NOT NULL default '',
  csstemplate text NOT NULL default '',
  approval integer NOT NULL default '0',
  scale integer NOT NULL default '0',
  assessed integer NOT NULL default '0',
  assesspublic integer NOT NULL default '0',
  defaultsort integer NOT NULL default '0',
  defaultsortdir integer NOT NULL default '0',
  editany integer NOT NULL default '0'
);



CREATE TABLE prefix_data_content (
  id SERIAL PRIMARY KEY,
  fieldid integer NOT NULL default '0',
  recordid integer NOT NULL default '0',
  content text NOT NULL default '',
  content1 text NOT NULL default '',
  content2 text NOT NULL default '',
  content3 text NOT NULL default '',
  content4 text NOT NULL default ''
);


CREATE TABLE prefix_data_fields (
  id SERIAL PRIMARY KEY,
  dataid integer NOT NULL default '0',
  type varchar(255) NOT NULL default '',
  name varchar(255) NOT NULL default '',
  description text NOT NULL default '',
  param1  text NOT NULL default '',
  param2  text NOT NULL default '',
  param3  text NOT NULL default '',
  param4  text NOT NULL default '',
  param5  text NOT NULL default '',
  param6  text NOT NULL default '',
  param7  text NOT NULL default '',
  param8  text NOT NULL default '',
  param9  text NOT NULL default '',
  param10 text NOT NULL default ''
);

CREATE TABLE prefix_data_records (
  id SERIAL PRIMARY KEY,
  userid integer NOT NULL default '0',
  groupid integer NOT NULL default '0',
  dataid integer NOT NULL default '0',
  timecreated integer NOT NULL default '0',
  timemodified integer NOT NULL default '0',
  approved integer NOT NULL default '0'
);


CREATE TABLE prefix_data_comments (
  id SERIAL PRIMARY KEY,
  userid integer NOT NULL default '0',
  recordid integer NOT NULL default '0',
  content text NOT NULL default '',
  created integer NOT NULL default '0',
  modified integer NOT NULL default '0'
);


CREATE TABLE prefix_data_ratings (
  id SERIAL PRIMARY KEY,
  userid integer NOT NULL default '0',
  recordid integer NOT NULL default '0',
  rating integer NOT NULL default '0'
);

INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'view', 'data', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'add', 'data', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'update', 'data', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'record delete', 'data', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'fields add', 'data_fields', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'fields update', 'data_fields', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'templates saved', 'data', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('data', 'templates def', 'data', 'name');
{'fraction_non_alphanumeric': 0.10327589874494789, 'fraction_numerical': 0.020846628376941078, 'mean_word_length': 4.557328605200945, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '325722', 'n_tokens_mistral': 2799, 'n_tokens_neox': 2693, 'n_words': 1201}