-
Notifications
You must be signed in to change notification settings - Fork 0
/
triggers.sql
29 lines (24 loc) · 1.03 KB
/
triggers.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
CREATE TRIGGER `increment_utilisateur_version_medecin` AFTER UPDATE ON `medecin`
FOR EACH ROW update utilisateur
set version = version + 1
where id = old.idutilisateur;
CREATE TRIGGER `increment_utilisateur_version_visite` AFTER UPDATE ON `visite`
FOR EACH ROW update utilisateur
set version = version + 1
where id = old.idutilisateur;
CREATE TRIGGER `increment_utilisateur_version_insert_visite` AFTER INSERT ON `visite`
FOR EACH ROW update utilisateur
set version = version + 1
where id = new.idutilisateur;
CREATE TRIGGER `increment_utilisateur_version_delete_visite` AFTER DELETE ON `visite`
FOR EACH ROW update utilisateur
set version = version + 1
where id = old.idutilisateur;
CREATE TRIGGER `increment_utilisateur_version_delete_medecin` AFTER DELETE ON `medecin`
FOR EACH ROW update utilisateur
set version = version + 1
where id = old.idutilisateur
CREATE TRIGGER `increment_utilisateur_version_insert_medecin` AFTER INSERT ON `medecin`
FOR EACH ROW update utilisateur
set version = version + 1
where id = new.idutilisateur;