<commit_before>/*
 * Mise a jour du schema de la base de donnees
 * version 1.2.3
 */
 /*
  * Ajout du droit import
  */
set search_path=gacl;
insert into aclaco (aclaco_id, aclappli_id, aco) values (6, 1, 'import');
insert into aclgroup (aclgroup_id, groupe, aclgroup_id_parent) values (6, 'import', 3);
insert into aclacl (aclaco_id, aclgroup_id) values (6, 6);
select setval('aclaco_aclaco_id_seq', (select max(aclaco_id) from aclaco));
select setval('aclgroup_aclgroup_id_seq', (select max(aclgroup_id) from aclgroup));

/*
 * Script d'amelioration des performances en recherche d'echantillons
 */
 SET search_path = col;
 create extension pg_trgm;

drop index if exists object_identifier_idx;
create index object_identifier_idx on object using gin (identifier gin_trgm_ops);
create index if not exists object_identifier_value_idx on object_identifier using gin (object_identifier_value gin_trgm_ops);
create index if not exists sample_dbuid_origin_idx on sample using gin (dbuid_origin gin_trgm_ops);

/*
 * amelioration de la recherche pour les metadonnees
 * creez un index pour chaque item utilise dans les recherches
 * exemple : 
 * create index sample_metadata_taxon_idx on sample using gin ((metadata->>'taxon') gin_trgm_ops);
 */
 <commit_msg>Ajout du numéro de version dans le script de maj<commit_after>/*
 * Mise a jour du schema de la base de donnees
 * version 1.2.3
 */
 /*
  * Ajout du droit import
  */
set search_path=gacl;
insert into aclaco (aclaco_id, aclappli_id, aco) values (6, 1, 'import');
insert into aclgroup (aclgroup_id, groupe, aclgroup_id_parent) values (6, 'import', 3);
insert into aclacl (aclaco_id, aclgroup_id) values (6, 6);
select setval('aclaco_aclaco_id_seq', (select max(aclaco_id) from aclaco));
select setval('aclgroup_aclgroup_id_seq', (select max(aclgroup_id) from aclgroup));

/*
 * Script d'amelioration des performances en recherche d'echantillons
 */
 SET search_path = col;
 create extension pg_trgm;

drop index if exists object_identifier_idx;
create index object_identifier_idx on object using gin (identifier gin_trgm_ops);
create index if not exists object_identifier_value_idx on object_identifier using gin (object_identifier_value gin_trgm_ops);
create index if not exists sample_dbuid_origin_idx on sample using gin (dbuid_origin gin_trgm_ops);

/*
 * amelioration de la recherche pour les metadonnees
 * creez un index pour chaque item utilise dans les recherches
 * exemple : 
 * create index sample_metadata_taxon_idx on sample using gin ((metadata->>'taxon') gin_trgm_ops);
 */
 /*
 * Fin d'execution du script
 * Mise a jour de dbversion
 */
insert into dbversion ("dbversion_number", "dbversion_date")
values 
('1.2.3','2017-11-22');
{'fraction_non_alphanumeric': 0.0880503144654088, 'fraction_numerical': 0.01072881982981872, 'mean_word_length': 5.547215496368039, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4368517', 'n_tokens_mistral': 927, 'n_tokens_neox': 887, 'n_words': 299}