EXEC P_ALTERPK 'PK_FMM_BASECONFIG', 'T_FMM_BASECONFIG', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_BASEIG_FNUMBER') CREATE INDEX IDX_FMM_BASEIG_FNUMBER ON T_FMM_BASECONFIG ( FNUMBER);
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_BASEIG_FCREATETIME') CREATE INDEX IDX_FMM_BASEIG_FCREATETIME ON T_FMM_BASECONFIG ( FCREATETIME);

EXEC P_ALTERPK 'PK_FMM_BASECONFIG_L', 'T_FMM_BASECONFIG_L', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_BASEIGL_FID') CREATE INDEX IDX_FMM_BASEIGL_FID ON T_FMM_BASECONFIG_L (FID,FLOCALEID );

EXEC P_ALTERPK 'PK_FMM_CONFIGENTRY', 'T_FMM_CONFIGENTRY', 'FENTRYID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_CONFRY_FID') CREATE INDEX IDX_FMM_CONFRY_FID ON T_FMM_CONFIGENTRY (FID);

EXEC P_ALTERPK 'PK_FMM_SCENEPARAM', 'T_FMM_SCENEPARAM', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_SCENAM_FNUMBER') CREATE INDEX IDX_FMM_SCENAM_FNUMBER ON T_FMM_SCENEPARAM (FNUMBER);
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_SCENAM_FCREATETIME') CREATE INDEX IDX_FMM_SCENAM_FCREATETIME ON T_FMM_SCENEPARAM (FCREATETIME);

EXEC P_ALTERPK 'PK_FMM_SCENEPARAM_L', 'T_FMM_SCENEPARAM_L', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_SCENAML_FID') CREATE INDEX IDX_FMM_SCENAML_FID ON T_FMM_SCENEPARAM_L (FID,FLOCALEID );

EXEC P_ALTERPK 'PK_FMM_SCENEPARAMENTRY', 'T_FMM_SCENEPARAMENTRY', 'FENTRYID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_SCENRY_FSEQ') CREATE INDEX IDX_FMM_SCENRY_FSEQ ON T_FMM_SCENEPARAMENTRY (FID);

EXEC P_ALTERPK 'PK_FMM_SCENEGROUP', 'T_FMM_SCENEGROUP', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_SCENUP_FNUMBER') CREATE INDEX IDX_FMM_SCENUP_FNUMBER ON T_FMM_SCENEGROUP ( FNUMBER);
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_SCENUP_FSCENEPARAMID') CREATE INDEX IDX_FMM_SCENUP_FSCENEPARAMID ON T_FMM_SCENEGROUP ( FSCENEPARAMID);

EXEC P_ALTERPK 'PK_FMM_SCENEGROUP_L', 'T_FMM_SCENEGROUP_L', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_SCENUPL_FID') CREATE INDEX IDX_FMM_SCENUPL_FID ON T_FMM_SCENEGROUP_L (FID,FLOCALEID );

EXEC P_ALTERPK 'PK_FMM_PROCESSPLANLIB', 'T_FMM_PROCESSPLANLIB', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PROCIB_FNUMBER') CREATE INDEX IDX_FMM_PROCIB_FNUMBER ON T_FMM_PROCESSPLANLIB ( FNUMBER);
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PROCIB_FCREATETIME') CREATE INDEX IDX_FMM_PROCIB_FCREATETIME ON T_FMM_PROCESSPLANLIB ( FCREATETIME);

EXEC P_ALTERPK 'PK_FMM_PROCESSPLANLIB_L', 'T_FMM_PROCESSPLANLIB_L', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PROCIBL_FID') CREATE INDEX IDX_FMM_PROCIBL_FID ON T_FMM_PROCESSPLANLIB_L (FID,FLOCALEID );

EXEC P_ALTERPK 'PK_FMM_PROCESSLIBPARAM', 'T_FMM_PROCESSLIBPARAM', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PROCAM_FENTRYID') CREATE INDEX IDX_FMM_PROCAM_FENTRYID ON T_FMM_PROCESSLIBPARAM (FENTRYID,FBASEDATAID );

EXEC P_ALTERPK 'PK_FMM_PROCESSPLANLIBENTRY', 'T_FMM_PROCESSPLANLIBENTRY', 'FENTRYID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PROCRY_FID') CREATE INDEX IDX_FMM_PROCRY_FID ON T_FMM_PROCESSPLANLIBENTRY (FID);

EXEC P_ALTERPK 'PK_FMM_PROCESSPLANNODE', 'T_FMM_PROCESSPLANNODE', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PROCDE_FNUMBER') CREATE INDEX IDX_FMM_PROCDE_FNUMBER ON T_FMM_PROCESSPLANNODE ( FNUMBER);

EXEC P_ALTERPK 'PK_FMM_PROCESSPLANNODE_L', 'T_FMM_PROCESSPLANNODE_L', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_PROCDEL_FID') CREATE INDEX IDX_FMM_PROCDEL_FID ON T_FMM_PROCESSPLANNODE_L (FID,FLOCALEID );

EXEC P_ALTERPK 'PK_FMM_NODECONFIGOBJ', 'T_FMM_NODECONFIGOBJ', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_NODEBJ_FID') CREATE INDEX IDX_FMM_NODEBJ_FID ON T_FMM_NODECONFIGOBJ (FID,FBASEDATAID );




