/**BEGIN  **/

  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_TEMPLATEUSER' AND KSQL_COL_NAME ='FENTITYID')
 ALTER TABLE T_EB_TEMPLATEUSER ADD (FENTITYID BIGINT NOT NULL DEFAULT 0);
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_TEMPLATEUSER' AND KSQL_COL_NAME ='FENTITY_RANGE')
 ALTER TABLE T_EB_TEMPLATEUSER ADD (FENTITY_RANGE NVARCHAR(10) DEFAULT '10' NOT NULL);
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_TEMPLATEUSER' AND KSQL_COL_NAME ='FENTITYTYPE')
 ALTER TABLE T_EB_TEMPLATEUSER ADD (FENTITYTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL);
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_TEMPLATEUSER' AND KSQL_COL_NAME ='FSIGN_KEY')
 ALTER TABLE T_EB_TEMPLATEUSER ADD (FSIGN_KEY NVARCHAR(500) DEFAULT ' ' NOT NULL);
 
  IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_TEMPLATEUSER_P4') 
 CREATE INDEX IDX_EB_TEMPLATEUSER_P4 ON T_EB_TEMPLATEUSER ( FENTITYID );

/**END **/