Create table HRIS_TRAVEL_ITNARY
(
ITNARY_ID NUMBER(7,0) NOT NULL PRIMARY KEY,
ITNARY_CODE VARCHAR2(15 BYTE) NOT NULL,
EMPLOYEE_ID NUMBER(7,0) NOT NULL,
FROM_DT DATE NOT NULL,
TO_DT DATE NOT NULL,
NO_OF_DAYS NUMBER(3,0) NOT NULL,
PURPOSE VARCHAR2(255 BYTE),
FLOAT_MONEY FLOAT(126),
TRANSPORT_TYPE CHAR(2 BYTE),
TOTAL_DAYS NUMBER(3,0),
REMARKS VARCHAR2(225 BYTE),
LOCKED_FLAG CHAR(1 BYTE) NOT NULL CHECK(LOCKED_FLAG IN ('Y','N')),
STATUS CHAR(1 BYTE) NOT NULL CHECK(STATUS IN ('E','D')),
CREATED_BY NUMBER(7,0),
CREATED_DT DATE,
MODIFIED_BY NUMBER(7,0),
MODIFIED_DT DATE,
DELETED_BY NUMBER(7,0),
DELETED_DT NUMBER(7,0)
);


CREATE TABLE HRIS_ITNARY_MEMBERS(
ITNARY_ID NUMBER(7,0) NOT NULL,
EMPLOYEE_ID NUMBER(7,0) NOT NULL,
STATUS VARCHAR2(2) NOT NULL,   
RECOMMENDED_BY NUMBER(7,0),     
RECOMMENDED_DATE DATE,         
RECOMMENDED_REMARKS VARCHAR2(255), 
APPROVED_BY NUMBER(7,0),     
APPROVED_DATE DATE,          
APPROVED_REMARKS VARCHAR2(255) 
);


CREATE TABLE HRIS_ITNARY_DETAILS
(
ITNARY_ID NUMBER(7,0),
DEPARTURE_DT DATE,
DEPARTURE_TIME VARCHAR2(10 BYTE),
LOCATION_FROM VARCHAR2(255 BYTE),
LOCATION_TO VARCHAR2(255 BYTE),
TRANSPORT_TYPE CHAR(2 BYTE),
ARRIVE_DT DATE,
ARRIVE_TIME VARCHAR2(10 BYTE),
REMARKS VARCHAR2(255 BYTE)
);

alter table HRIS_ITNARY_DETAILS add  SNO number(2,0);