CREATE TABLE fun_wf_patterns (
    PATTERN_ID               NUMBER(18, 0) ,
    RULE_ID                  NUMBER(18, 0)     NOT NULL,
    PATTERN_ORDER            NUMBER(18, 0)     NOT NULL,
    PARENT_PATTERN_ID        NUMBER(18, 0) ,
    FACT_PATH                VARCHAR2(1024)    NOT NULL,
    FORM_CODE                VARCHAR2(256) ,
    PATTERN_VARIABLE         VARCHAR2(1024),
    FACT_TYPE_NAME           VARCHAR2(1024),
    FACT_TYPE_KEY            VARCHAR2(4000),
    CONNECTIVE_OPERATOR      VARCHAR2(256) ,
    TEST_FORM_CODE           VARCHAR2(256) ,
    OPERATOR                 VARCHAR2(256) ,
    AGGREGATE_VARIABLE       VARCHAR2(1024),
    AGGREGATE_FUNCTION       VARCHAR2(256) ,
    AGGREGATE_EXPRESSION     VARCHAR2(2048),
    OBJECT_VERSION_NUMBER    NUMBER(9, 0)      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) ,
    PATTERN_ID               NUMBER(18, 0) ,
    RULE_ID                  NUMBER(18, 0)     NOT NULL,
    PATTERN_ORDER            NUMBER(18, 0)     NOT NULL,
    PARENT_PATTERN_ID        NUMBER(18, 0) ,
    FACT_PATH                VARCHAR2(1024)    NOT NULL,
    FORM_CODE                VARCHAR2(256) ,
    PATTERN_VARIABLE         VARCHAR2(1024),
    FACT_TYPE_NAME           VARCHAR2(1024),
    FACT_TYPE_KEY            VARCHAR2(4000),
    CONNECTIVE_OPERATOR      VARCHAR2(256) ,
    TEST_FORM_CODE           VARCHAR2(256) ,
    OPERATOR                 VARCHAR2(256) ,
    AGGREGATE_VARIABLE       VARCHAR2(1024),
    AGGREGATE_FUNCTION       VARCHAR2(256) ,
    AGGREGATE_EXPRESSION     VARCHAR2(2048),
    OBJECT_VERSION_NUMBER    NUMBER(9, 0)      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) ,
    CONSTRAINT pk_fun_wf_patterns PRIMARY KEY (PATTERN_ID, PATTERN_ID)
);
