/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_table.sql **/
 EXEC p_AlterColumn 'T_BCM_GUIDEMENU', 'FNAME', 'NVARCHAR(100)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_GUIDEMENU', 'FDESCRIPTION', 'NVARCHAR(500)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_GUIDEMENU_L', 'FNAME', 'NVARCHAR(100)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_BCM_GUIDEMENU_L', 'FDESCRIPTION', 'NVARCHAR(500)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_FORMULAREGISTER' AND KSQL_COL_NAME ='FCLASSPATH') 
 ALTER TABLE T_BCM_FORMULAREGISTER ADD (FCLASSPATH VARCHAR(50) DEFAULT ' ' NOT NULL );



IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_MODELPERM' AND KSQL_COL_NAME ='FUSERNAME') 
 ALTER TABLE T_BCM_MODELPERM ADD (FUSERNAME NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ENTITYNAMERECORD' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BCM_ENTITYNAMERECORD ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ENTITYNAMERECORD' AND KSQL_COL_NAME ='FSIMPLENAME') 
 ALTER TABLE T_BCM_ENTITYNAMERECORD ADD (FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_NOFINANCIALFILE' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BCM_NOFINANCIALFILE ADD (FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_TEMPSTYLESCHEME' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BCM_TEMPSTYLESCHEME ADD (FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
 EXEC p_AlterColumn 'T_BCM_BIZRULECATALOG', 'FNAME', 'NVARCHAR(500)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ISSINGLEMAP' AND KSQL_COL_NAME ='FTARGMEMBNAME') 
 ALTER TABLE T_BCM_ISSINGLEMAP ADD (FTARGMEMBNAME NVARCHAR(200) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ISSINGLEMAP' AND KSQL_COL_NAME ='FSRCMEMBNAME') 
 ALTER TABLE T_BCM_ISSINGLEMAP ADD (FSRCMEMBNAME NVARCHAR(200) DEFAULT ' ' NOT NULL );
 EXEC p_AlterColumn 'T_BCM_BIZRULEVERSION', 'FNAME', 'NVARCHAR(500)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_BCM_SCHEMECATALOG_L', 'FNAME', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_SCHEMECATALOG_L', 'FFULLNAME', 'NVARCHAR(100)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_SRCDIMBASEDATA_L', 'FNAME', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_INTEGRATESCHEME_L', 'FNAME', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_ENTITYNAMERECORD_L', 'FNAME', 'NVARCHAR(255)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_ENTITYNAMERECORD_L', 'FSIMPLENAME', 'NVARCHAR(100)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_CONVERTDIFFENTITY_L', 'FNAME', 'NVARCHAR(100)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_MODELOLAP_RECORD_L', 'FNAME', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_BIZRULE', 'FNAME', 'NVARCHAR(500)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_BCM_CONVERTDIFFENTITY', 'FNAME', 'NVARCHAR(100)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_SCHEMECATALOG', 'FNAME', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_SCHEMECATALOG', 'FFULLNAME', 'NVARCHAR(100)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_SRCDIMBASEDATA', 'FNAME', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_INTEGRATESCHEME', 'FNAME', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_MODELOLAP_RECORD', 'FNAME', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_INVELIMTEMPLATE', 'FREMARK', 'NVARCHAR(200)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_TEMPLATE', 'FVERSIONDESCRIPTION', 'NVARCHAR(500)', 'NOT NULL', '1111', ''' ''';

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_table.sql **/
