/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2008 Applaud Solutions UK Ltd                |
 |                             All rights reserved                            |
 *===========================================================================*/

SET VERIFY OFF
SET FEEDBACK OFF
WHENEVER OSERROR  EXIT FAILURE ROLLBACK
WHENEVER SQLERROR EXIT FAILURE ROLLBACK

DECLARE
  e_obj_not_exists EXCEPTION;
  PRAGMA EXCEPTION_INIT(e_obj_not_exists, -00942);
BEGIN
  EXECUTE IMMEDIATE 'DROP TABLE XXAS_ASG_SNAPSHOT';
EXCEPTION
  WHEN e_obj_not_exists THEN
    NULL;
END;
/

CREATE TABLE XXAS_ASG_SNAPSHOT
  (assignment_id      number        NOT NULL
  ,language           varchar2(30)  NOT NULL
  ,person_id          number        NOT NULL
  ,business_group_id  number        NOT NULL
  ,worker_status      varchar2(30)  NOT NULL
  ,search_content     XMLType       NOT NULL
  ,non_search_content XMLType       NOT NULL
  ,creation_date      date
  ,created_by         number
  ,last_update_date   date
  ,last_updated_by    number
  ,last_update_login  number
  ,CONSTRAINT xxas_asg_snapshot_pk1 PRIMARY KEY (assignment_id, language));

GRANT ALL ON XXAS_ASG_SNAPSHOT TO &1 WITH GRANT OPTION;

COMMIT; 
EXIT;
