/**BEGIN E:\NEXTERP_PDM\PDM_UPGRADE\PDMS\BRANCH_LASTEST\PDM\EB_TABLE.SQL **/
/**引用表 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_ANALYSISCANVAS_QUOTE')
CREATE TABLE T_EB_ANALYSISCANVAS_QUOTE
(
    FID             BIGINT          DEFAULT 0   NOT NULL,
    FCANVASID       BIGINT          DEFAULT 0   NOT NULL,
    FIMAGEID        BIGINT          DEFAULT 0   NOT NULL
);
EXEC P_ALTERPK 'PK_T_EB_ANALYSISCANVAS_QUOTE', 'T_EB_ANALYSISCANVAS_QUOTE', 'FID', '1';

-- 索引
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ANAQUOTE_CANVAS')
CREATE INDEX IDX_ANAQUOTE_CANVAS ON T_EB_ANALYSISCANVAS_QUOTE ( FCANVASID );

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ANAQUOTE_IMAGE')
CREATE INDEX IDX_ANAQUOTE_IMAGE ON T_EB_ANALYSISCANVAS_QUOTE ( FIMAGEID );

/**END E:\NEXTERP_PDM\PDM_UPGRADE\PDMS\BRANCH_LASTEST\PDM\EB_TABLE.SQL **/

