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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SVC_PRINTFONT') 
 CREATE TABLE T_SVC_PRINTFONT (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME VARCHAR(80) DEFAULT ' ' NOT NULL,
FRCID VARCHAR(50) DEFAULT ' ' NOT NULL,
FTENANTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCE CHAR(1) DEFAULT ' ' NOT NULL,
FORDERNUM INT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME DEFAULT GETDATE() NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SVC_PRINTFONT' AND KSQL_COL_NAME ='FALIAS') 
 ALTER TABLE T_SVC_PRINTFONT ADD (FALIAS NVARCHAR(50) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SVC_PRINTFONT_L') 
 CREATE TABLE T_SVC_PRINTFONT_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(20) DEFAULT ' ' NOT NULL,
FALIAS NVARCHAR(100) DEFAULT ' ' NOT NULL
);



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