
SELECT setval('tls_connection_id_seq', 1);
SELECT setval('tls_connection_data_item_id_seq', 1);
SELECT setval('tls_connection_data_item_aliases_item_id_seq', 1);
SELECT setval('tls_test_instance_id_seq', 1);

-- Clear proxy messages
--Following table does not exist : pxy_abstract_message_attributesforcommandset
TRUNCATE TABLE pxy_connection, pxy_abstract_message;
SELECT setval('pxy_message_id_seq', 1);

-- Delete ATNA Questionnaires except the template
DELETE FROM atna_audited_event where atna_questionnaire_id != (select id from atna_questionnaire where system = 'TEMPLATE');
DELETE FROM atna_network_communication where atna_questionnaire_id != (select id from atna_questionnaire where system = 'TEMPLATE');
DELETE FROM atna_tls_test where atna_questionnaire_id != (select id from atna_questionnaire where system = 'TEMPLATE');
DELETE FROM atna_questionnaire where system != 'TEMPLATE';
DELETE FROM atna_testing_session where description != 'Demonstration';

TRUNCATE TABLE xua_service_provider_test_instance;
SELECT setval('xua_service_provider_test_instance_id_seq', 1);


-- Delete SyslogCollector data
TRUNCATE TABLE syslog_message ;
SELECT setval('syslog_message_id_seq', 1);
