forked from I-TECH/KenyaLIS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBLIS_Kenya_Tables_Truncate.sql
34 lines (34 loc) · 1.02 KB
/
BLIS_Kenya_Tables_Truncate.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
SET foreign_key_checks = 0;
TRUNCATE TABLE access_log;
TRUNCATE TABLE access_type;
TRUNCATE TABLE audit_trail;
TRUNCATE TABLE bills;
TRUNCATE TABLE bills_test_association;
TRUNCATE TABLE comment;
TRUNCATE TABLE custom_field_type;
TRUNCATE TABLE delay_measures;
TRUNCATE TABLE external_lab_request;
TRUNCATE TABLE import_log;
TRUNCATE TABLE inv_reagent;
TRUNCATE TABLE inv_supply;
TRUNCATE TABLE inv_usage;
TRUNCATE TABLE patient;
TRUNCATE TABLE patient_custom_data;
TRUNCATE TABLE patient_custom_field;
TRUNCATE TABLE patient_daily;
TRUNCATE TABLE payments;
TRUNCATE TABLE rejected_specimen;
TRUNCATE TABLE rejection_phases;
TRUNCATE TABLE rejection_reasons;
TRUNCATE TABLE removal_record;
TRUNCATE TABLE specimen;
TRUNCATE TABLE stock_content;
TRUNCATE TABLE stock_details;
TRUNCATE TABLE test;
TRUNCATE TABLE unit;
DELETE FROM user WHERE username <> 'testlab1_admin';
TRUNCATE TABLE version_data;
TRUNCATE TABLE worksheet_custom;
TRUNCATE TABLE worksheet_custom_test;
TRUNCATE TABLE worksheet_custom_userfield;
SET foreign_key_checks = 0;