source: trunk/Mars/hawc/processing/DiskToDB/null_trigger.sql@ 20112

Last change on this file since 20112 was 20105, checked in by maslowski, 4 years ago
Added Triggers for DataOnDisk and a seperate table for auxiliary files.
File size: 370 bytes
Line 
1delimiter $$
2CREATE TRIGGER null_trigger
3BEFORE UPDATE ON DataOnDisk
4FOR EACH ROW
5BEGIN
6 IF NEW.header IS NULL THEN
7 SET NEW.calibration = NEW.header;
8 END IF;
9 IF NEW.calibration IS NULL THEN
10 SET NEW.auxiliary = NEW.calibration;
11 SET NEW.callisto = NEW.calibration;
12 END IF;
13 IF NEW.callisto IS NULL THEN
14 SET NEW.star = NEW.callisto;
15 END IF;
16END; $$
17delimiter ;
Note: See TracBrowser for help on using the repository browser.