Skip to content
Snippets Groups Projects
sample.sql 23.3 KiB
Newer Older
TRUNCATE TABLE res_letterbox;
ALTER SEQUENCE res_id_mlb_seq restart WITH 1;
INSERT INTO res_letterbox (res_id, title, subject, description, type_id, format, typist, creation_date, modification_date, converter_result, author, identifier, source, relation, doc_date, docserver_id, folders_system_id, path, filename, offset_doc, fingerprint, filesize, status, destination, validation_date, work_batch, origin, priority, policy_id, cycle_id, is_multi_docservers, custom_t1, custom_n1, custom_f1, custom_d1, custom_t2, custom_n2, custom_f2, custom_d2, custom_t3, custom_n3, custom_f3, custom_d3, custom_t4, custom_n4, custom_f4, custom_d4, custom_t5, custom_n5, custom_f5, custom_d5, custom_t6, custom_d6, custom_t7, custom_d7, custom_t8, custom_d8, custom_t9, custom_d9, custom_t10, custom_d10, custom_t11, custom_t12, custom_t13, custom_t14, custom_t15, reference_number, tablename, initiator, dest_user) 
VALUES (1, NULL, 'Demande de dérogation carte scolaire', '', 305, 'pdf', 'bblier', '2019-03-20 14:02:59.318229', '2019-03-20 14:02:59.318229', NULL, NULL, NULL, NULL, NULL, '2019-02-15 00:00:00', 'FASTHD_MAN', NULL, 'tests#', 'demande_derogation.pdf', '', '0', 24942, 'ESIG', 'PJS', NULL, NULL, NULL, 'poiuytre1357nbvc', NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', 'res_letterbox', 'COU', 'bbain');
INSERT INTO res_letterbox (res_id, title, subject, description, type_id, format, typist, creation_date, modification_date, converter_result, author, identifier, source, relation, doc_date, docserver_id, folders_system_id, path, filename, offset_doc, fingerprint, filesize, status, destination, validation_date, work_batch, origin, priority, policy_id, cycle_id, is_multi_docservers, custom_t1, custom_n1, custom_f1, custom_d1, custom_t2, custom_n2, custom_f2, custom_d2, custom_t3, custom_n3, custom_f3, custom_d3, custom_t4, custom_n4, custom_f4, custom_d4, custom_t5, custom_n5, custom_f5, custom_d5, custom_t6, custom_d6, custom_t7, custom_d7, custom_t8, custom_d8, custom_t9, custom_d9, custom_t10, custom_d10, custom_t11, custom_t12, custom_t13, custom_t14, custom_t15, reference_number, tablename, initiator, dest_user)
VALUES (2, NULL, 'Demande de travaux route 66', '', 918, 'pdf', 'bblier', '2019-03-20 16:50:45.143382', '2019-03-20 16:50:45.143382', NULL, NULL, NULL, NULL, NULL, '2019-02-15 00:00:00', 'FASTHD_MAN', NULL, 'tests#', 'sva_route_66.pdf', '', '0', 24877, 'ESIG', 'PTE', NULL, NULL, NULL, 'poiuytre1357nbvc', NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', 'res_letterbox', 'COU', 'ccharles');
INSERT INTO res_letterbox (res_id, title, subject, description, type_id, format, typist, creation_date, modification_date, converter_result, author, identifier, source, relation, doc_date, docserver_id, folders_system_id, path, filename, offset_doc, fingerprint, filesize, status, destination, validation_date, work_batch, origin, priority, policy_id, cycle_id, is_multi_docservers, custom_t1, custom_n1, custom_f1, custom_d1, custom_t2, custom_n2, custom_f2, custom_d2, custom_t3, custom_n3, custom_f3, custom_d3, custom_t4, custom_n4, custom_f4, custom_d4, custom_t5, custom_n5, custom_f5, custom_d5, custom_t6, custom_d6, custom_t7, custom_d7, custom_t8, custom_d8, custom_t9, custom_d9, custom_t10, custom_d10, custom_t11, custom_t12, custom_t13, custom_t14, custom_t15, reference_number, tablename, initiator, dest_user)
VALUES (3, NULL, 'Plainte voisin chien bruyant', '', 503, 'pdf', 'bblier', '2019-03-20 16:50:45.143382', '2019-03-20 16:50:45.143382', NULL, NULL, NULL, NULL, NULL, '2019-02-15 00:00:00', 'FASTHD_MAN', NULL, 'tests#', 'svr_route_chien_bruyant.pdf', '', '0', 24877, 'ESIG', 'DGS', NULL, NULL, NULL, 'poiuytre1357nbvc', NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', 'res_letterbox', 'COU', 'rrenaud');
INSERT INTO res_letterbox (res_id, title, subject, description, type_id, format, typist, creation_date, modification_date, converter_result, author, identifier, source, relation, doc_date, docserver_id, folders_system_id, path, filename, offset_doc, fingerprint, filesize, status, destination, validation_date, work_batch, origin, priority, policy_id, cycle_id, is_multi_docservers, custom_t1, custom_n1, custom_f1, custom_d1, custom_t2, custom_n2, custom_f2, custom_d2, custom_t3, custom_n3, custom_f3, custom_d3, custom_t4, custom_n4, custom_f4, custom_d4, custom_t5, custom_n5, custom_f5, custom_d5, custom_t6, custom_d6, custom_t7, custom_d7, custom_t8, custom_d8, custom_t9, custom_d9, custom_t10, custom_d10, custom_t11, custom_t12, custom_t13, custom_t14, custom_t15, reference_number, tablename, initiator, dest_user)
VALUES (4, NULL, 'Invitation pour échanges journées des sports', '', 110, 'pdf', 'bbain', '2019-03-20 17:53:42.472335', '2019-03-20 17:53:42.472335', NULL, NULL, NULL, 'with_empty_file', NULL, '2019-03-20 00:00:00', 'FASTHD_MAN', NULL, 'tests#', 'empty.pdf', '', '0', 111108, 'ESIG', 'PJS', NULL, NULL, NULL, 'poiuytre1357nbvc', NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', 'res_letterbox', 'PJS', 'bbain');
INSERT INTO res_letterbox (res_id, title, subject, description, type_id, format, typist, creation_date, modification_date, converter_result, author, identifier, source, relation, doc_date, docserver_id, folders_system_id, path, filename, offset_doc, fingerprint, filesize, status, destination, validation_date, work_batch, origin, priority, policy_id, cycle_id, is_multi_docservers, custom_t1, custom_n1, custom_f1, custom_d1, custom_t2, custom_n2, custom_f2, custom_d2, custom_t3, custom_n3, custom_f3, custom_d3, custom_t4, custom_n4, custom_f4, custom_d4, custom_t5, custom_n5, custom_f5, custom_d5, custom_t6, custom_d6, custom_t7, custom_d7, custom_t8, custom_d8, custom_t9, custom_d9, custom_t10, custom_d10, custom_t11, custom_t12, custom_t13, custom_t14, custom_t15, reference_number, tablename, initiator, dest_user)
VALUES (5, NULL, 'Demande de place en creche', '', 307, 'pdf', 'bblier', '2019-03-20 16:50:45.143382', '2019-03-20 16:50:45.143382', NULL, NULL, NULL, NULL, NULL, '2019-02-15 00:00:00', 'FASTHD_MAN', NULL, 'tests#', 'demande_place_creche.pdf', '', '0', 24877, 'ESIG', 'PE', NULL, NULL, NULL, 'poiuytre1357nbvc', NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', 'res_letterbox', 'COU', 'ssaporta');
INSERT INTO res_letterbox (res_id, title, subject, description, type_id, format, typist, creation_date, modification_date, converter_result, author, identifier, source, relation, doc_date, docserver_id, folders_system_id, path, filename, offset_doc, fingerprint, filesize, status, destination, validation_date, work_batch, origin, priority, policy_id, cycle_id, is_multi_docservers, custom_t1, custom_n1, custom_f1, custom_d1, custom_t2, custom_n2, custom_f2, custom_d2, custom_t3, custom_n3, custom_f3, custom_d3, custom_t4, custom_n4, custom_f4, custom_d4, custom_t5, custom_n5, custom_f5, custom_d5, custom_t6, custom_d6, custom_t7, custom_d7, custom_t8, custom_d8, custom_t9, custom_d9, custom_t10, custom_d10, custom_t11, custom_t12, custom_t13, custom_t14, custom_t15, reference_number, tablename, initiator, dest_user)
VALUES (6, NULL, 'Relance place en creche', '', 307, 'pdf', 'bblier', '2019-03-20 16:50:45.143382', '2019-03-20 16:50:45.143382', NULL, NULL, NULL, NULL, NULL, '2019-02-15 00:00:00', 'FASTHD_MAN', NULL, 'tests#', 'relance_place_creche.pdf', '', '0', 24877, 'ESIG', 'PE', NULL, NULL, NULL, 'poiuytre1357nbvc', NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', 'res_letterbox', 'COU', 'ssaporta');
Select setval('res_id_mlb_seq', (select max(res_id)+1 from res_letterbox), false);

TRUNCATE TABLE adr_letterbox;
ALTER SEQUENCE adr_letterbox_id_seq restart WITH 1;
INSERT INTO adr_letterbox (id, res_id, type, docserver_id, path, filename, fingerprint)
VALUES (1, 1, 'PDF', 'CONVERT_MLB', 'tests#', 'demande_derogation.pdf', '0');
INSERT INTO adr_letterbox (id, res_id, type, docserver_id, path, filename, fingerprint)
VALUES (2, 2, 'PDF', 'CONVERT_MLB', 'tests#', 'sva_route_66.pdf', '0');
INSERT INTO adr_letterbox (id, res_id, type, docserver_id, path, filename, fingerprint)
VALUES (3, 3, 'PDF', 'CONVERT_MLB', 'tests#', 'svr_route_chien_bruyant.pdf', '0');
INSERT INTO adr_letterbox (id, res_id, type, docserver_id, path, filename, fingerprint)
VALUES (4, 4, 'PDF', 'CONVERT_MLB', 'tests#', 'emtpy.pdf', '0');
INSERT INTO adr_letterbox (id, res_id, type, docserver_id, path, filename, fingerprint)
VALUES (5, 5, 'PDF', 'CONVERT_MLB', 'tests#', 'demande_place_creche.pdf', '0');
INSERT INTO adr_letterbox (id, res_id, type, docserver_id, path, filename, fingerprint)
VALUES (6, 6, 'PDF', 'CONVERT_MLB', 'tests#', 'relance_place_creche.pdf', '0');
Select setval('adr_letterbox_id_seq', (select max(res_id)+1 from adr_letterbox), false);

TRUNCATE TABLE res_attachments;
ALTER SEQUENCE res_attachment_res_id_seq restart WITH 1;
INSERT INTO res_attachments (res_id, title, subject, description, type_id, format, typist, creation_date, author, identifier, source, relation, doc_date, docserver_id, folders_system_id, path, filename, offset_doc, fingerprint, filesize, status, destination, validation_date, effective_date, work_batch, origin, priority, initiator, dest_user, coll_id, res_id_master, attachment_type, dest_contact_id, dest_address_id, updated_by, is_multicontacts, is_multi_docservers, tnl_path, tnl_filename, fulltext_result, in_signature_book, signatory_user_serial_id, convert_result, convert_attempts, fulltext_attempts, tnl_attempts, tnl_result, external_id)
VALUES (1, 'ar_derogation', NULL, NULL, 0, 'pdf', 'bbain', '2019-03-20 14:04:12.826168', NULL, 'MAARCH/2019D/1', NULL, 1, NULL, 'FASTHD_MAN', NULL, 'tests#', 'ar_derogation.pdf', ' ', '0', 41682, 'FRZ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'letterbox_coll', 1, 'response_project', 4, 6, NULL, NULL, 'N', NULL, NULL, NULL, true, NULL, NULL, NULL, NULL, NULL, NULL, '1');
INSERT INTO res_attachments (res_id, title, subject, description, type_id, format, typist, creation_date, author, identifier, source, relation, doc_date, docserver_id, folders_system_id, path, filename, offset_doc, fingerprint, filesize, status, destination, validation_date, effective_date, work_batch, origin, priority, initiator, dest_user, coll_id, res_id_master, attachment_type, dest_contact_id, dest_address_id, updated_by, is_multicontacts, is_multi_docservers, tnl_path, tnl_filename, fulltext_result, in_signature_book, signatory_user_serial_id, convert_result, convert_attempts, fulltext_attempts, tnl_attempts, tnl_result, external_id)
VALUES (2, 'ar_sva', NULL, NULL, 0, 'pdf', 'ccharles', '2019-03-20 16:51:39.510776', NULL, 'MAARCH/2019D/2', NULL, 1, NULL, 'FASTHD_MAN', NULL, 'tests#', 'ar_sva.pdf', ' ', '0', 44907, 'FRZ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'letterbox_coll', 2, 'response_project', 4, 6, NULL, NULL, 'N', NULL, NULL, NULL, true, NULL, NULL, NULL, NULL, NULL, NULL, '2');
INSERT INTO res_attachments (res_id, title, subject, description, type_id, format, typist, creation_date, author, identifier, source, relation, doc_date, docserver_id, folders_system_id, path, filename, offset_doc, fingerprint, filesize, status, destination, validation_date, effective_date, work_batch, origin, priority, initiator, dest_user, coll_id, res_id_master, attachment_type, dest_contact_id, dest_address_id, updated_by, is_multicontacts, is_multi_docservers, tnl_path, tnl_filename, fulltext_result, in_signature_book, signatory_user_serial_id, convert_result, convert_attempts, fulltext_attempts, tnl_attempts, tnl_result, external_id)
VALUES (3, 'ar_svr', NULL, NULL, 0, 'pdf', 'rrenaud', '2019-03-20 16:51:39.510776', NULL, 'MAARCH/2019D/3', NULL, 1, NULL, 'FASTHD_MAN', NULL, 'tests#', 'ar_svr.pdf', ' ', '0', 44907, 'FRZ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'letterbox_coll', 3, 'response_project', 4, 6, NULL, NULL, 'N', NULL, NULL, NULL, true, NULL, NULL, NULL, NULL, NULL, NULL, '3');
INSERT INTO res_attachments (res_id, title, subject, description, type_id, format, typist, creation_date, author, identifier, source, relation, doc_date, docserver_id, folders_system_id, path, filename, offset_doc, fingerprint, filesize, status, destination, validation_date, effective_date, work_batch, origin, priority, initiator, dest_user, coll_id, res_id_master, attachment_type, dest_contact_id, dest_address_id, updated_by, is_multicontacts, is_multi_docservers, tnl_path, tnl_filename, fulltext_result, in_signature_book, signatory_user_serial_id, convert_result, convert_attempts, fulltext_attempts, tnl_attempts, tnl_result, external_id)
VALUES (4, 'invitation', NULL, NULL, 0, 'pdf', 'bbain', '2019-03-20 17:54:00.954235', NULL, 'MAARCH/2019D/4', NULL, 1, NULL, 'FASTHD_MAN', NULL, 'tests#', 'invitation.pdf', ' ', '0', 47379, 'FRZ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'letterbox_coll', 4, 'outgoing_mail', 4, 6, NULL, NULL, 'N', NULL, NULL, NULL, true, NULL, NULL, NULL, NULL, NULL, NULL, '4');
INSERT INTO res_attachments (res_id, title, subject, description, type_id, format, typist, creation_date, author, identifier, source, relation, doc_date, docserver_id, folders_system_id, path, filename, offset_doc, fingerprint, filesize, status, destination, validation_date, effective_date, work_batch, origin, priority, initiator, dest_user, coll_id, res_id_master, attachment_type, dest_contact_id, dest_address_id, updated_by, is_multicontacts, is_multi_docservers, tnl_path, tnl_filename, fulltext_result, in_signature_book, signatory_user_serial_id, convert_result, convert_attempts, fulltext_attempts, tnl_attempts, tnl_result, external_id)
VALUES (5, 'rep_creche', NULL, NULL, 0, 'pdf', 'ssaporta', '2019-03-20 16:51:39.510776', NULL, 'MAARCH/2019D/5', NULL, 1, NULL, 'FASTHD_MAN', NULL, 'tests#', 'rep_creche.pdf', ' ', '0', 44907, 'FRZ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'letterbox_coll', 5, 'response_project', 4, 6, NULL, NULL, 'N', NULL, NULL, NULL, true, NULL, NULL, NULL, NULL, NULL, NULL, '5');
INSERT INTO res_attachments (res_id, title, subject, description, type_id, format, typist, creation_date, author, identifier, source, relation, doc_date, docserver_id, folders_system_id, path, filename, offset_doc, fingerprint, filesize, status, destination, validation_date, effective_date, work_batch, origin, priority, initiator, dest_user, coll_id, res_id_master, attachment_type, dest_contact_id, dest_address_id, updated_by, is_multicontacts, is_multi_docservers, tnl_path, tnl_filename, fulltext_result, in_signature_book, signatory_user_serial_id, convert_result, convert_attempts, fulltext_attempts, tnl_attempts, tnl_result, external_id)
VALUES (6, 'rep_standard', NULL, NULL, 0, 'pdf', 'ssaporta', '2019-03-20 16:51:39.510776', NULL, 'MAARCH/2019D/6', NULL, 1, NULL, 'FASTHD_MAN', NULL, 'tests#', 'rep_standard.pdf', ' ', '0', 44907, 'FRZ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'letterbox_coll', 6, 'response_project', 4, 6, NULL, NULL, 'N', NULL, NULL, NULL, true, NULL, NULL, NULL, NULL, NULL, NULL, '6');
Select setval('res_attachment_res_id_seq', (select max(res_id)+1 from res_attachments), false);

TRUNCATE TABLE adr_attachments;
ALTER SEQUENCE adr_attachments_id_seq restart WITH 1;
INSERT INTO adr_attachments (id, res_id, type, docserver_id, path, filename, fingerprint)
VALUES (1, 1, 'PDF', 'CONVERT_ATTACH', 'tests#', 'ar_derogation.pdf', '0');
INSERT INTO adr_attachments (id, res_id, type, docserver_id, path, filename, fingerprint)
VALUES (2, 2, 'PDF', 'CONVERT_ATTACH', 'tests#', 'ar_sva.pdf', '0');
INSERT INTO adr_attachments (id, res_id, type, docserver_id, path, filename, fingerprint)
VALUES (3, 3, 'PDF', 'CONVERT_ATTACH', 'tests#', 'ar_svr.pdf', '0');
INSERT INTO adr_attachments (id, res_id, type, docserver_id, path, filename, fingerprint)
VALUES (4, 4, 'PDF', 'CONVERT_ATTACH', 'tests#', 'invitation.pdf', '0');
INSERT INTO adr_attachments (id, res_id, type, docserver_id, path, filename, fingerprint)
VALUES (5, 5, 'PDF', 'CONVERT_ATTACH', 'tests#', 'rep_creche.pdf', '0');
INSERT INTO adr_attachments (id, res_id, type, docserver_id, path, filename, fingerprint)
VALUES (6, 6, 'PDF', 'CONVERT_ATTACH', 'tests#', 'rep_standard.pdf', '0');
Select setval('adr_attachments_id_seq', (select max(res_id)+1 from adr_attachments), false);

TRUNCATE TABLE mlb_coll_ext;
INSERT INTO mlb_coll_ext (res_id, category_id, exp_contact_id, exp_user_id, dest_contact_id, dest_user_id, nature_id, alt_identifier, admission_date, process_limit_date, closing_date, alarm1_date, alarm2_date, flag_alarm1, flag_alarm2, is_multicontacts, address_id)
VALUES (1, 'incoming', 4, NULL, NULL, NULL, 'simple_mail', 'MAARCH/2019A/1', '2019-03-20 00:00:00', '2019-06-17 23:59:59', NULL, NULL, NULL, 'N', 'N', NULL, 6);
INSERT INTO mlb_coll_ext (res_id, category_id, exp_contact_id, exp_user_id, dest_contact_id, dest_user_id, nature_id, alt_identifier, admission_date, process_limit_date, closing_date, alarm1_date, alarm2_date, flag_alarm1, flag_alarm2, is_multicontacts, address_id)
VALUES (2, 'incoming', 4, NULL, NULL, NULL, 'simple_mail', 'MAARCH/2019A/2', '2019-03-20 00:00:00', '2019-05-19 23:59:59', NULL, NULL, NULL, 'N', 'N', NULL, 6);
INSERT INTO mlb_coll_ext (res_id, category_id, exp_contact_id, exp_user_id, dest_contact_id, dest_user_id, nature_id, alt_identifier, admission_date, process_limit_date, closing_date, alarm1_date, alarm2_date, flag_alarm1, flag_alarm2, is_multicontacts, address_id)
VALUES (3, 'incoming', 4, NULL, NULL, NULL, 'simple_mail', 'MAARCH/2019A/3', '2019-03-20 00:00:00', '2019-05-19 23:59:59', NULL, NULL, NULL, 'N', 'N', NULL, 6);
INSERT INTO mlb_coll_ext (res_id, category_id, exp_contact_id, exp_user_id, dest_contact_id, dest_user_id, nature_id, alt_identifier, admission_date, process_limit_date, closing_date, alarm1_date, alarm2_date, flag_alarm1, flag_alarm2, is_multicontacts, address_id)
VALUES (4, 'outgoing', NULL, NULL, 4, NULL, 'simple_mail', 'MAARCH/2019D/4', NULL, '2019-05-19 23:59:59', NULL, NULL, NULL, 'N', 'N', NULL, 6);
INSERT INTO mlb_coll_ext (res_id, category_id, exp_contact_id, exp_user_id, dest_contact_id, dest_user_id, nature_id, alt_identifier, admission_date, process_limit_date, closing_date, alarm1_date, alarm2_date, flag_alarm1, flag_alarm2, is_multicontacts, address_id)
VALUES (5, 'incoming', 5, NULL, NULL, NULL, 'simple_mail', 'MAARCH/2019A/4', '2019-03-20 00:00:00', '2019-05-19 23:59:59', NULL, NULL, NULL, 'N', 'N', NULL, 6);
INSERT INTO mlb_coll_ext (res_id, category_id, exp_contact_id, exp_user_id, dest_contact_id, dest_user_id, nature_id, alt_identifier, admission_date, process_limit_date, closing_date, alarm1_date, alarm2_date, flag_alarm1, flag_alarm2, is_multicontacts, address_id)
VALUES (6, 'incoming', 6, NULL, NULL, NULL, 'simple_mail', 'MAARCH/2019A/5', '2019-03-20 00:00:00', '2019-05-19 23:59:59', NULL, NULL, NULL, 'N', 'N', NULL, 6);

TRUNCATE TABLE listinstance;
ALTER SEQUENCE listinstance_id_seq restart WITH 1;
INSERT INTO listinstance (listinstance_id, coll_id, res_id, listinstance_type, sequence, item_id, item_type, item_mode, added_by_user, added_by_entity, visible, viewed, difflist_type, process_date, process_comment, signatory, requested_signature)
VALUES (1, 'letterbox_coll', 1, 'DOC', 0, 'bbain', 'user_id', 'dest', 'bbain', 'PJS', 'Y', 0, 'entity_id', NULL, '', false, false);
INSERT INTO listinstance (listinstance_id, coll_id, res_id, listinstance_type, sequence, item_id, item_type, item_mode, added_by_user, added_by_entity, visible, viewed, difflist_type, process_date, process_comment, signatory, requested_signature)
VALUES (2, 'letterbox_coll', 1, 'DOC', 0, 'DSG', 'entity_id', 'cc', 'bbain', 'PJS', 'Y', 0, 'entity_id', NULL, NULL, false, false);
INSERT INTO listinstance (listinstance_id, coll_id, res_id, listinstance_type, sequence, item_id, item_type, item_mode, added_by_user, added_by_entity, visible, viewed, difflist_type, process_date, process_comment, signatory, requested_signature)
VALUES (3, 'letterbox_coll', 2, 'DOC', 0, 'ccharles', 'user_id', 'dest', 'ccharles', 'PTE', 'Y', 0, 'entity_id', NULL, '', false, false);
INSERT INTO listinstance (listinstance_id, coll_id, res_id, listinstance_type, sequence, item_id, item_type, item_mode, added_by_user, added_by_entity, visible, viewed, difflist_type, process_date, process_comment, signatory, requested_signature)
VALUES (4, 'letterbox_coll', 2, 'DOC', 0, 'DSG', 'entity_id', 'cc', 'ccharles', 'PTE', 'Y', 0, 'entity_id', NULL, NULL, false, false);
INSERT INTO listinstance (listinstance_id, coll_id, res_id, listinstance_type, sequence, item_id, item_type, item_mode, added_by_user, added_by_entity, visible, viewed, difflist_type, process_date, process_comment, signatory, requested_signature)
VALUES (5, 'letterbox_coll', 3, 'DOC', 0, 'rrenaud', 'user_id', 'dest', 'rrenaud', 'DGS', 'Y', 0, 'entity_id', NULL, '', false, false);
INSERT INTO listinstance (listinstance_id, coll_id, res_id, listinstance_type, sequence, item_id, item_type, item_mode, added_by_user, added_by_entity, visible, viewed, difflist_type, process_date, process_comment, signatory, requested_signature)
VALUES (6, 'letterbox_coll', 4, 'DOC', 0, 'bbain', 'user_id', 'dest', 'bbain', 'PJS', 'Y', 0, 'entity_id', NULL, '', false, false);
INSERT INTO listinstance (listinstance_id, coll_id, res_id, listinstance_type, sequence, item_id, item_type, item_mode, added_by_user, added_by_entity, visible, viewed, difflist_type, process_date, process_comment, signatory, requested_signature)
VALUES (7, 'letterbox_coll', 5, 'DOC', 0, 'ssaporta', 'user_id', 'dest', 'ssaporta', 'PE', 'Y', 0, 'entity_id', NULL, '', false, false);
INSERT INTO listinstance (listinstance_id, coll_id, res_id, listinstance_type, sequence, item_id, item_type, item_mode, added_by_user, added_by_entity, visible, viewed, difflist_type, process_date, process_comment, signatory, requested_signature)
VALUES (8, 'letterbox_coll', 5, 'DOC', 0, 'DSG', 'entity_id', 'cc', 'bbain', 'PJS', 'Y', 0, 'entity_id', NULL, NULL, false, false);
INSERT INTO listinstance (listinstance_id, coll_id, res_id, listinstance_type, sequence, item_id, item_type, item_mode, added_by_user, added_by_entity, visible, viewed, difflist_type, process_date, process_comment, signatory, requested_signature)
VALUES (9, 'letterbox_coll', 6, 'DOC', 0, 'ssaporta', 'user_id', 'dest', 'ssaporta', 'PE', 'Y', 0, 'entity_id', NULL, '', false, false);
INSERT INTO listinstance (listinstance_id, coll_id, res_id, listinstance_type, sequence, item_id, item_type, item_mode, added_by_user, added_by_entity, visible, viewed, difflist_type, process_date, process_comment, signatory, requested_signature)
VALUES (10, 'letterbox_coll', 6, 'DOC', 0, 'DSG', 'entity_id', 'cc', 'bbain', 'PJS', 'Y', 0, 'entity_id', NULL, NULL, false, false);
Select setval('listinstance_id_seq', (select max(listinstance_id)+1 from listinstance), false);