Geotrek-admin icon indicating copy to clipboard operation
Geotrek-admin copied to clipboard

BDD - Pas de ON DELETE, ni ON UPDATE sur les tables

Open makinabot opened this issue 12 years ago • 1 comments

DELETE

  • Delete e_t_evenement + e_r_evenement for delete on all "inherited" models
  • Set value = Null for delete on all bibs FK
  • Delete cascade for delete on all bibs N-N

UPDATE

  • l_t_troncon (supprime) -> e_r_evenement + e_t_evenement (une fois #752 implémenté)
  • o_b_difficulte (id) -> o_t_itineraire (difficulte)
CONSTRAINT difficulte_refs_id FOREIGN KEY (difficulte) REFERENCES o_b_difficulte (id) MATCH SIMPLE
      ON UPDATE CASCADE ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED,

Questions

  • Set project = null on intervention for delete project ?

makinabot avatar May 06 '13 16:05 makinabot

Managed by django, but django don't add constraints in database directly.

submarcos avatar Jan 25 '24 14:01 submarcos