-- File renamed from mach_triggers.sql - Dave Banks - FALCP/CA/1771 - 8th March 2006

create or replace trigger ti_mach_flight_info
before insert on mach_flight_info
for each row
begin

	if (:new.id is null or :new.id = 0 ) then
		select
			flight_info_id.nextval
		into
			:new.id
		from
			dual;
	end if;

	:new.timestamp := sysdate;

end;
/
