/*****************************************************************************
*
* Filename         - $Workfile:   enable.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         - Enable constraints etc after importing config data
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1997
*
*****************************************************************************/
/****************************************************************************
* @(#)$Workfile:   enable.sql  $  $Revision:   1.9  $
*
* 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/data/enable.sqv  $
* 
*    Rev 1.9   31 Jan 2000 14:46:10   tagtrak
*  
* 
*    Rev 1.8   29 Mar 1999 11:17:10   tagtrak
*  
* 
*    Rev 1.7.1.0   25 Feb 1999 15:25:46   tagtrak
* OR: 
* CR: 13385
* REV:
* Modifications to provide interface for Ferranti (FASL) Flight
* Information at San Francisco.
* -------------
* Andrew Walker
* 
*    Rev 1.7   12 Oct 1998 16:41:54   tagtrak
* OR: 12682 12683 12678 12654 12419 12265 12805 12285
* CR: 12682 12683 12678 12654 12419 12265 12805
* REV:
* Vienna enhancements/fixes for database V0.4.1E
* branch ATS revision moved to trunk.
* Andrew Walker
* 
*    Rev 1.6.1.0   25 Sep 1998 12:34:00   tagtrak
* OR: 12682 12683 12678 12654 12419 12265 12285
* CR: 12682 12683 12678 12654 12419 12265
* REV:
* Vienna enhancements for Database 0.4.1
* Andrew Walker
* 
*    Rev 1.5.2.0   18 Aug 1998 09:36:52   tagtrak
* OR: 12484
* CR: 12484
* REV:
* Merging Vienna (0.3.1E) and Core Product (0.2.5E).
* Andrew Walker
* 
*    Rev 1.5.1.0   05 Jun 1998 15:01:04   tagtrak
* OR:
* CR: 12098
* REV:
* Vienna Modifications
* Andrew Walker
* 
*    Rev 1.5   02 Apr 1998 19:26:34   tagtrak
* OR:
* CR:
* REV:
* Initial Issue
* See label for concession
* 
*    Rev 1.4   26 Feb 1998 14:20:02   tagtrak
* OR:
* CR:
* REV:
* Initial core product version
* 
*    Rev 1.3.1.0   19 Jan 1998 14:22:50   tagtrak
* OR:
* CR:
* REV:
* Added statements to handle new tables & constraints
* added for data privacy mods
* 
* 
*    Rev 1.3   30 Oct 1997 09:06:02   tagtrak
* OR:
* CR:
* REV:
* Removed references to constraints which
* no longer exist
* 
*    Rev 1.2   24 Oct 1997 14:11:10   tagtrak
*  Added PVCS header information
*
****************************************************************************/

alter table bag enable
constraint bag_fk_location ;

alter table bag enable
constraint bag_fk_pax ;

alter table bag enable
constraint bag_fk_ulds ;

alter table bag_trace enable
constraint bag_trace_fk_tagtrak_users ;

alter table bag_trace enable
constraint bag_trace_fk_location ;

alter table bag_trace enable
constraint bag_trace_fk_error ;

alter table carrier_lookup enable
constraint carrier_lkp_fk_users ;

alter table error enable
constraint error_fk_tagtrak_users ;

alter table flight enable
constraint flight_fk_system_cfg;

alter table flight_dests enable
constraint flight_dests_fk_flight ;

alter table flight_status enable
constraint flight_status_fk_flight ;

alter table flight_trace enable
constraint flight_trace_fk_flight ;

alter table fs_events enable
constraint fs_events_fk_flight ;

alter table location enable
constraint location_fk_tagtrak_users ;

alter table log_table enable
constraint log_table_fk_tagtrak_users ;

alter table mba_flights enable
constraint mba_flights_fk_flight ;

alter table pax enable
constraint pax_fk_flight ;

alter table privilege enable
constraint privilege_fk_tagtrak_users ;

alter table tagtrak_users enable
constraint tagtrak_users_fk_user_group ;

alter table uld_dests enable
constraint uld_dests_fk_ulds ;

alter table uld_trace enable
constraint uld_trace_fk_ulds ;

alter table uld_trace enable
constraint uld_trace_fk_tagtrak_users ;

alter table ulds enable
constraint ulds_fk_flight ;

alter table CONTRACTED_AGENTS enable
constraint CONT_AGENTS_FK_CARRIER;

alter table CONTRACTED_AGENTS enable
constraint CONTRACTED_AGENTS_FK_AGENTS;

alter table FLIGHT_ACCESS enable
constraint FLIGHT_ACCESS_FK_FLIGHT;

alter table FLIGHT_ACCESS enable
constraint FLT_ACCESS_FK_FLT_PRIV;

alter table FLIGHT_ACCESS enable
constraint FLIGHT_ACCESS_FK_AGENTS;

alter table FLIGHT_PRIVILEGES enable
constraint FLIGHT_PRIV_FK_CARRIER;

alter table FLIGHT_PRIVILEGES enable
constraint FLIGHT_PRIVILEGES_FK_AGENTS;

alter table FLIGHT_PRIVILEGES enable
constraint FLIGHT_PRIVILEGES_FK_AGENTS2;

alter table tagtrak_users enable
constraint TAGTRAK_USERS_FK_AGENTS;

alter table flight enable
constraint FLIGHT_FK_CARRIER;

alter table carrier_lookup enable
constraint CARRIER_LKP_FK_CREDS;
        
alter table location enable
constraint LOCATION_FK_LOCATION_GROUP;

alter table stats enable
constraint stats_fk_tagtrak_users;

alter table user_trace enable
constraint user_trace_fk_error;

alter table kit enable
constraint kit_fk_tagtrak_users;

alter table kit enable
constraint kit_fk_kit_type;

alter table bag enable
constraint bag_fk_system_cfg;
 
alter table bpm_status_trace enable
constraint bpm_status_trace_fk_system_cfg;
        
alter table kit enable
constraint kit_fk_location;

alter table user_trace enable
constraint user_trace_fk_kit;

alter table pax enable
constraint pax_fk_flight_2;

alter table flight_events enable
constraint flight_events_fk_location;

alter table flight_info  enable
constraint FLIGHT_INFO_FK_SYS_INTERFACE;
 
alter table onward_flight  enable
constraint ONWARD_FLIGHT_FK_PAX;

alter table  CODE_SHARE        enable  constraint  CHECK_DIRECTION ;
alter table  FASL_FLIGHT_INFO  enable  constraint  FASL_INFO_CHK_DIR;
alter table  FLIGHT_INFO       enable  constraint  FLIGHT_INFO_FK_SYS_INTERFACE   ;
alter table  KIT               enable  constraint  UN_KIT;
alter table  LOCATION_GROUP    enable  constraint  LOCATION_GROUP_CHK_DESCRIPTION ;
alter table  MACH_FLIGHT_INFO  enable  constraint  MACH_FLINFO_CHECK_DIRECTION;
alter table  ONWARD_FLIGHT     enable  constraint  ONWARD_FLIGHT_FK_PAX;
alter table  STATS             enable  constraint  STATS_UNIQUE   ;
alter table  STATS_ACCESS      enable  constraint  STATS_ACCESS_UNIQUE;
alter table  LBA_INFO          enable  constraint  lba_info_fk_flight;

ALTER TABLE flight_events ENABLE CONSTRAINT flight_events_fk_flight_id;
ALTER TABLE flight_events ENABLE CONSTRAINT flight_events_fk_end_location;
ALTER TABLE flight_event_types ENABLE CONSTRAINT flight_event_types_fk_agent;

