Geotrek-admin
Geotrek-admin copied to clipboard
BDD - Pas de ON DELETE, ni ON UPDATE sur les tables
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 ?
Managed by django, but django don't add constraints in database directly.