IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_INT_WORKINGHOURS' AND KSQL_COL_NAME ='FISSYSTEM')
ALTER TABLE T_INT_WORKINGHOURS ADD (FISSYSTEM CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_INT_WORKINGTIME' AND KSQL_COL_NAME ='FISSYSTEM')
ALTER TABLE T_INT_WORKINGTIME ADD (FISSYSTEM CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_INT_WORKINGPLAN' AND KSQL_COL_NAME ='FISSYSTEM')
ALTER TABLE T_INT_WORKINGPLAN ADD (FISSYSTEM CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_INT_PUBLICHOLIDAY' AND KSQL_COL_NAME ='FISSYSTEM')
ALTER TABLE T_INT_PUBLICHOLIDAY ADD (FISSYSTEM CHAR(1) DEFAULT '0' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_INT_WORKINGPLAN_L')
CREATE TABLE T_INT_WORKINGPLAN_L (
                                     FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
                                     FID BIGINT DEFAULT 0 NOT NULL,
                                     FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
                                     FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
                                     FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_INT_WORKINGPLANHOURS_L')
CREATE TABLE T_INT_WORKINGPLANHOURS_L (
                                          FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
                                          FENTRYID BIGINT DEFAULT 0 NOT NULL,
                                          FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
                                          FSPECIALDESC NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_INT_WORKINGTIME_L')
CREATE TABLE T_INT_WORKINGTIME_L (
                                     FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
                                     FID BIGINT DEFAULT 0 NOT NULL,
                                     FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
                                     FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_INT_HOLIDAYRANGE_L')
CREATE TABLE T_INT_HOLIDAYRANGE_L (
                                      FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
                                      FENTRYID BIGINT DEFAULT 0 NOT NULL,
                                      FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
                                      FTEXT NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_INT_WORKINGHOURS_L')
CREATE TABLE T_INT_WORKINGHOURS_L (
                                      FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
                                      FID BIGINT DEFAULT 0 NOT NULL,
                                      FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
                                      FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);



