/**Begin C:\PDM_UPGRADE\sharepdmdir\srm\pdm1\SRM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRM_COMPCONFIG' AND KSQL_COL_NAME IN ('FVERSION')) 
 ALTER TABLE T_SRM_COMPCONFIG ADD (FVERSION VARCHAR(2) DEFAULT '2' NOT NULL );
 

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRM_COMPEENTRYCONFIG') 
 CREATE TABLE T_SRM_COMPEENTRYCONFIG (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FENTRYNAME NVARCHAR(80) DEFAULT ' ' NOT NULL,
FENTRYTYPE VARCHAR(2) DEFAULT ' ' NOT NULL,
FICON VARCHAR(255) DEFAULT ' ' NOT NULL,
FPCURL VARCHAR(255) DEFAULT ' ' NOT NULL,
FOPENTYPE VARCHAR(2) DEFAULT '2' NOT NULL
);


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



/**End C:\PDM_UPGRADE\sharepdmdir\srm\pdm1\SRM_table.sql **/
