/**Begin D:\PDM_UPGRADE\PDM1\BOS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_AUTOASSIGN_ASSIGNORG' AND KSQL_COL_NAME ='FORGFILTERSCHEMEID') 
 ALTER TABLE T_BD_AUTOASSIGN_ASSIGNORG ADD (FORGFILTERSCHEMEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_AUTOASSIGN_USEORG' AND KSQL_COL_NAME ='FSEQ') 
 ALTER TABLE T_BD_AUTOASSIGN_USEORG ADD (FSEQ INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_ORGFILTERSCHEME') 
 CREATE TABLE T_BD_ORGFILTERSCHEME (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FENTITYID VARCHAR(36) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFILTERCONDITION NCLOB DEFAULT ' ',
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME
);

/**End D:\PDM_UPGRADE\PDM1\BOS_table.sql **/
