/**Begin C:\PDM_UPGRADE\PDM1\SRM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_COMPCONFIG') 
 CREATE TABLE T_SRM_COMPCONFIG (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FISMOBILE CHAR(1) DEFAULT '0' NOT NULL,
FTOPCOMPID BIGINT DEFAULT 0 NOT NULL,
FBOTTOMCOMPID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FCREATEORGID BIGINT DEFAULT 0 NOT NULL,
FUSEORGID BIGINT DEFAULT 0 NOT NULL,
FSOURCEDATAID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FBITINDEX BIGINT DEFAULT 0 NOT NULL,
FCTRLSTRATEGY CHAR(1) DEFAULT ' ' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FSOURCEBITINDEX BIGINT DEFAULT 0 NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FPORTALADDRESS NVARCHAR(512) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_COMPCONFIGENTRY') 
 CREATE TABLE T_SRM_COMPCONFIGENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCOMPONENTID BIGINT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_COMPGROUP') 
 CREATE TABLE T_SRM_COMPGROUP (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCOMPOBJECTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FPARENTID BIGINT DEFAULT 0 NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FISLEAF CHAR(1) DEFAULT '0' NOT NULL,
FLEVEL BIGINT DEFAULT 0 NOT NULL,
FLONGNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFULLNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_COMPONENT') 
 CREATE TABLE T_SRM_COMPONENT (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCOMPONENTSYS CHAR(1) DEFAULT '0' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FCREATEORGID BIGINT DEFAULT 0 NOT NULL,
FSOURCEDATAID BIGINT DEFAULT 0 NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FUSEORGID BIGINT DEFAULT 0 NOT NULL,
FBITINDEX BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSOURCEBITINDEX BIGINT DEFAULT 0 NOT NULL,
FCTRLSTRATEGY CHAR(1) DEFAULT ' ' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FNOTICESHOWTIME BIGINT DEFAULT 0 NOT NULL,
FISFILTER CHAR(1) DEFAULT '0' NOT NULL,
FNOTICETYPE VARCHAR(100) DEFAULT ' ' NOT NULL,
FBIDTYPE VARCHAR(100) DEFAULT ' ' NOT NULL,
FLOGOPICTURE NVARCHAR(512) DEFAULT ' ' NOT NULL,
FBOTCOLOLR VARCHAR(100) DEFAULT ' ' NOT NULL,
FPHONE VARCHAR(50) DEFAULT ' ' NOT NULL,
FEMAIL VARCHAR(50) DEFAULT ' ' NOT NULL,
FADDRESS NVARCHAR(100) DEFAULT ' ' NOT NULL,
FVERSIONDATA NVARCHAR(255) DEFAULT ' ' NOT NULL,
FICPDATA NVARCHAR(255) DEFAULT ' ' NOT NULL,
FICPLINK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FNETDATA NVARCHAR(255) DEFAULT ' ' NOT NULL,
FNETLINK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSWITCHTIME BIGINT DEFAULT 0 NOT NULL,
FPORTALNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FREGBUTTONNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FREGQUERYBUTTON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FLOGINBUTTON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FALLTHEMECOLOLR VARCHAR(100) DEFAULT ' ' NOT NULL,
FTOPCOLOLR VARCHAR(100) DEFAULT ' ' NOT NULL,
FTRANSPARENCY BIGINT DEFAULT 0 NOT NULL,
FLEFTPICTURE NVARCHAR(512) DEFAULT ' ' NOT NULL,
FLEFTNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FLEFTNOTICETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FLEFTBIDTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FLRIGHTPICTURE NVARCHAR(512) DEFAULT ' ' NOT NULL,
FRIGHTNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FRIGHTNOTICETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FRIGHTBIDTYPE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_COMPONENT_L') 
 CREATE TABLE T_SRM_COMPONENT_L (
FPKID VARCHAR(20) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FADDRESS NVARCHAR(100) DEFAULT ' ' NOT NULL,
FVERSIONDATA NVARCHAR(255) DEFAULT ' ' NOT NULL,
FICPDATA NVARCHAR(255) DEFAULT ' ' NOT NULL,
FNETDATA NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPORTALNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FREGBUTTONNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FREGQUERYBUTTON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FLOGINBUTTON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FLEFTNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FRIGHTNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_SHOWFILEDENTRY') 
 CREATE TABLE T_SRM_SHOWFILEDENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FIELDNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FFIELDNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FISSYS CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_SHOWFILEDENTRY_L') 
 CREATE TABLE T_SRM_SHOWFILEDENTRY_L (
FPKID VARCHAR(20) DEFAULT ' ' NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FFIELDNAME NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_SUBSHOWFILEDENTRY') 
 CREATE TABLE T_SRM_SUBSHOWFILEDENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FNOTICEFORMID VARCHAR(50) DEFAULT ' ' NOT NULL,
FNOTICEFIELD VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_ABOUTENTRY') 
 CREATE TABLE T_SRM_ABOUTENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FABOUTNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FABOUTLINK NVARCHAR(512) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_FRINDLINKENTRY') 
 CREATE TABLE T_SRM_FRINDLINKENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FFRIENDLINKNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFRIENDLINK NVARCHAR(512) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_SWIPERSENTRY') 
 CREATE TABLE T_SRM_SWIPERSENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSWIPERSLINK NVARCHAR(512) DEFAULT ' ' NOT NULL,
FSWIPERSPICTURE NVARCHAR(512) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_PROCESSENTRY') 
 CREATE TABLE T_SRM_PROCESSENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPROCESSNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROCESSPIC NVARCHAR(512) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_SRCTYPE') 
 CREATE TABLE T_SRM_SRCTYPE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_LEFTSRCTYPE') 
 CREATE TABLE T_SRM_LEFTSRCTYPE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_RIGHTSRCTYPE') 
 CREATE TABLE T_SRM_RIGHTSRCTYPE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID VARCHAR(50) DEFAULT ' ' NOT NULL
);



/**End C:\PDM_UPGRADE\PDM1\SRM_table.sql **/
