/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_table.sql **/
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BAS_PRINTTPLINFO' AND KSQL_COL_NAME ='FCREATEORG') 
 ALTER TABLE T_BAS_PRINTTPLINFO ADD (FCREATEORG BIGINT DEFAULT -1 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BAS_PRINTTPLINFO' AND KSQL_COL_NAME ='FCTRLSTRATEGY') 
 ALTER TABLE T_BAS_PRINTTPLINFO ADD (FCTRLSTRATEGY VARCHAR(10) DEFAULT '5' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_PRINTTPLINFOUSAGE') 
 CREATE TABLE T_BAS_PRINTTPLINFOUSAGE (
FID BIGINT DEFAULT 0 NOT NULL,
FUSEORGID BIGINT DEFAULT 0 NOT NULL,
FDATAID BIGINT DEFAULT 0 NOT NULL,
FCTRLSTRATEGY CHAR(1) DEFAULT ' ' NOT NULL,
FISASSIGN CHAR(1) DEFAULT ' ' NOT NULL,
FASSIGNORGID BIGINT DEFAULT -1 NOT NULL,
FCREATEORGID BIGINT DEFAULT -1 NOT NULL
);



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