Zmiany pomiędzy wersją 1 and wersją 2 dla DeployerGuide/Others/DatabaseCleanup

Pokaż
Ignoruj:
Data i czas:
07/18/12 12:17:02 (12 years temu)
Autor:
JP (IP: 213.227.67.33)
Komentarz:

--

Legend:

Bez zmian
Dodane
Usunięte
Zmienione
  • DeployerGuide/Others/DatabaseCleanup

    v1 v2  
    3737delete from procedures; 
    3838 
     39-- czyszczenie usuniętych wpisów 
     40DELETE from fk_elements WHERE doc_id IN (SELECT doc_id FROM documents where adduid IN (SELECT usr_id FROM users where is_del is true)); 
     41 
     42delete from documents where adduid IN (SELECT usr_id FROM users where is_del is true); 
     43 
     44delete from rcp_cards WHERE emp_id IN(SELECT usr_id FROM users where is_del is true); 
     45 
     46delete from readed_comments where usr_id IN (SELECT usr_id FROM users where is_del is true); 
     47 
     48delete from contacts_caretakers where usr_id IN (SELECT usr_id FROM users where is_del is true); 
     49 
     50delete from vindication.vind_proc where vindyc IN (SELECT usr_id FROM users where is_del is true); 
     51 
     52DELETE from fk_elements WHERE adduid IN (SELECT usr_id FROM users where is_del is true); 
     53 
     54delete from users where is_del is true; 
     55 
     56delete from rcp_cards WHERE prc_id IN(select prc_id from processes where is_del is true); 
     57 
     58delete from fk_elements WHERE prc_id IN(select prc_id from processes where is_del is true); 
     59 
     60delete from process_participants WHERE prc_id IN(select prc_id from processes where is_del is true); 
     61 
     62delete from processes where is_del is true; 
     63 
     64delete FROM organization_units WHERE is_del IS TRUE; 
     65 
     66delete from fk_elements WHERE doc_id IN(SELECT doc_id FROM documents where is_del is true); 
     67 
     68delete from documents where is_del is true; 
     69 
     70 
    3971}}} 
    4072