CREATE TABLE fnd_bpm_fact_joins (
    JOIN_ID                     NUMBER        ,
    FACT_NAME                   VARCHAR2(320)     NOT NULL,
    FACT_NAME_SPACE             VARCHAR2(1600),
    REFERENCE_FACT              VARCHAR2(320)     NOT NULL,
    REFERENCE_FACT_NAMESPACE    VARCHAR2(1600),
    FACT_JOIN_KEY               VARCHAR2(1600)    NOT NULL,
    REFERENCE_JOIN_KEY          VARCHAR2(1600)    NOT NULL,
    CREATED_BY                  VARCHAR2(256)     NOT NULL,
    CREATION_DATE               TIMESTAMP(6)      NOT NULL,
    LAST_UPDATED_BY             VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_DATE            TIMESTAMP(6)      NOT NULL,
    LAST_UPDATE_LOGIN           VARCHAR2(128)     NOT NULL,
    SEED_DATA_SOURCE            VARCHAR2(2048),
    OBJECT_VERSION_NUMBER       NUMBER(9, 0)      NOT NULL,
    ORA_SEED_SET1               VARCHAR2(4)       NOT NULL,
    ORA_SEED_SET2               VARCHAR2(4)       NOT NULL,
    JOIN_ID                     NUMBER        ,
    FACT_NAME                   VARCHAR2(320)     NOT NULL,
    REFERENCE_FACT              VARCHAR2(320)     NOT NULL,
    FACT_JOIN_KEY               VARCHAR2(1600)    NOT NULL,
    REFERENCE_JOIN_KEY          VARCHAR2(1600)    NOT NULL,
    CREATED_BY                  VARCHAR2(256)     NOT NULL,
    CREATION_DATE               TIMESTAMP(6)      NOT NULL,
    LAST_UPDATED_BY             VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_DATE            TIMESTAMP(6)      NOT NULL,
    LAST_UPDATE_LOGIN           VARCHAR2(128)     NOT NULL,
    SEED_DATA_SOURCE            VARCHAR2(2048),
    OBJECT_VERSION_NUMBER       NUMBER(9, 0)      NOT NULL,
    FACT_NAME_SPACE             VARCHAR2(1600),
    REFERENCE_FACT_NAMESPACE    VARCHAR2(1600),
    ORA_SEED_SET1               VARCHAR2(4)       NOT NULL,
    ORA_SEED_SET2               VARCHAR2(4)       NOT NULL,
    CONSTRAINT pk_fnd_bpm_fact_joins PRIMARY KEY (JOIN_ID, JOIN_ID)
);
