/*****************************************************************************
*
* Filename         - $Workfile:   mba_flights_triggers.sql  $
*
*                     Name              Date      Version     CR Number
* Author           - See revision history below.
* Last Update      - See revision history below.
*
* Project Name     - TAGTRAK(Oracle Database)
*
* Source Code
* Identifier       - 0/3/300/8010/112
*
* Design Spec
* Section          - 
*
* Contents         -  Live Schema: triggers for mba_flights table
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1997
*
*****************************************************************************/
/****************************************************************************
* @(#)$Workfile:   mba_flights_triggers.sql  $  $Revision:   1.4  $
*
* Revision History
*
* Note that user tagtrak is many users. For these users the user
* name is entered as the last line in the change description.
*
* $Log:   /pvcsarch/db_ora/db/source/live/triggers/mba_flights_triggers.svl  $
* 
*    Rev 1.4   21 Jun 2001 15:04:32   tagtrak
* OR:
* CR:
* Re-baseline version 4.0.0 to include patches.
* 
*    Rev 1.3   02 Apr 1998 19:46:24   tagtrak
* OR:
* CR:
* REV:
* Initial Issue
* See label for concession
* 
*    Rev 1.2   26 Feb 1998 11:42:42   tagtrak
* OR:
* CR:
* REV:
* Initial core product version
* 
*    Rev 1.1   15 Jan 1998 13:39:08   tagtrak
* OR: OR11101, TN13, TN15
* CR:
* REV:
* Phase 2C to Phase 3 upgrade plus code review actions and resolving some technical issues.
* 
* 
*    Rev 1.0   22 Oct 1997 16:38:38   tagtrak
* OR:
* CR:
* REV:
* Initial check-in
*
****************************************************************************/


create or replace trigger td_mba_flights
after delete on mba_flights
for each row
begin

	/*
	 * After each delete on table mba_flights
	 *  - Delete the related bag alert for this flight_id.
	 */
	
	delete from
		bag_alert
	where
		flight_id = :old.flight_id;
end;
/
