/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\ER_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_BIZINFO_PLUGIN') 
 CREATE TABLE T_ER_BIZINFO_PLUGIN (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_BIZINFO_PLUGINDETAIL') 
 CREATE TABLE T_ER_BIZINFO_PLUGINDETAIL (
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FFUNCTION VARCHAR(50) DEFAULT ' ' NOT NULL,
FCLASSPATH VARCHAR(200) DEFAULT ' ' NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL
);

 EXEC P_ALTERPK 'PK_ER_BIZINFO_PLUGIN', 'T_ER_BIZINFO_PLUGIN', 'FID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_BIZINFO_PLUGIN_FNUMBER') CREATE INDEX IDX_ER_BIZINFO_PLUGIN_FNUMBER ON T_ER_BIZINFO_PLUGIN ( FNUMBER );


 EXEC P_ALTERPK 'PK_ER_BIZINFO_PLUGINDETAIL', 'T_ER_BIZINFO_PLUGINDETAIL', 'FDETAILID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_PLUGIN_FFUNCTION') CREATE INDEX IDX_ER_PLUGIN_FFUNCTION ON T_ER_BIZINFO_PLUGINDETAIL ( FID ,FFUNCTION );

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