/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BOS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PERM_OLDDATARULEENABLE') 
 CREATE TABLE T_PERM_OLDDATARULEENABLE (
FID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FMODIFYTIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL
); 

EXEC p_AlterColumn 'T_PERM_OLDDATARULEENABLE', 'FID', 'BIGINT', 'NOT NULL', '0001', '0';

EXEC p_AlterColumn 'T_PERM_DATARULE_L', 'FPKID', 'VARCHAR(18)', 'NOT NULL', '1111', ''' ''';

EXEC p_AlterColumn 'T_PERM_DATARULES_L', 'FPKID', 'VARCHAR(18)', 'NOT NULL', '1111', ''' ''';

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