/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\IFM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IFM_INNERACCT' AND KSQL_COL_NAME IN ('FCOMPANYID')) 
 ALTER TABLE T_IFM_INNERACCT ADD (FCOMPANYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IFM_INNERACCT' AND KSQL_COL_NAME IN ('FOPENORGID')) 
 ALTER TABLE T_IFM_INNERACCT ADD (FOPENORGID BIGINT DEFAULT 0 NOT NULL );
 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_IFM_INNERACCT', 'FAPPLYCOMPID', 'NULL', 'NULL', '1001', 'NULL';

 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_IFM_INNERACCT', 'FOPENCOMPID', 'NULL', 'NULL', '1001', 'NULL';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IFM_INNERACCTAPPLY' AND KSQL_COL_NAME IN ('FCOMPANYID')) 
 ALTER TABLE T_IFM_INNERACCTAPPLY ADD (FCOMPANYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IFM_INNERACCTAPPLY' AND KSQL_COL_NAME IN ('FOPENORGID')) 
 ALTER TABLE T_IFM_INNERACCTAPPLY ADD (FOPENORGID BIGINT DEFAULT 0 NOT NULL );
 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_IFM_INNERACCTAPPLY', 'FAPPLYCOMPID', 'NULL', 'NULL', '1001', 'NULL';

 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_IFM_INNERACCTAPPLY', 'FOPENCOMPID', 'NULL', 'NULL', '1001', 'NULL';


/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\IFM_table.sql **/
