/**Begin D:\Users\rd_william_li\Documents\lipin\PDM\PDM_UPGRADE\PDM_UPGRADE\pdm_new\SYS_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_FLY_BOOK') 
 CREATE TABLE T_BAS_FLY_BOOK (
FID BIGINT DEFAULT 0 NOT NULL,
FAPPID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FAPPSECRET NVARCHAR(50) DEFAULT ' ' NOT NULL,
FAPPNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME DEFAULT GETDATE(),
FMODIFYTIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL
);

EXEC P_ALTERPK 'PK_T_BAS_FLY_BOOK', 'T_BAS_FLY_BOOK', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_T_BAS_FLY_BOOK') CREATE INDEX INDEX_T_BAS_FLY_BOOK ON T_BAS_FLY_BOOK ( FAPPID );
 
/**End D:\Users\rd_william_li\Documents\lipin\PDM\PDM_UPGRADE\PDM_UPGRADE\pdm_new\SYS_table.sql **/
