
    create table USERMODULE (
        "UUID" raw(16),
        "MODULE" varchar2(16 char),
        "USER_ID" varchar2(20 char),
        "OS_CREATED_ON" date,
        "OS_MODIFIED_ON" date,
        "OS_RWDU" number(5,0),
        "OS_CREATED_BY" varchar2(20 char),
        "OS_MODIFIED_BY" varchar2(20 char),
        "OS_LICENSE" varchar2(4 char),
        "OS_OPC" varchar2(8 char),
        "OS_OWNER" number(5,0),
        "OS_GROUP" number(5,0),
        "OS_ANY" number(5,0),
        "AREA" number(5,0),
        "LOAD_AUTOMATIC" number(5,0),
        "SHOW_IN_FURTHER" number(5,0),
        "PARENT_MODULE" varchar2(16 char)
    );

alter table USERMODULE add constraint PID170DT170 primary key ("UUID");

    alter table USERMODULE
        add constraint FKUSERMODULEID405
        foreign key ("MODULE")
        references DT405
        on delete cascade
        deferrable
        novalidate;
    alter table USERMODULE enable validate constraint FKUSERMODULEID405;

    alter table USERMODULE
        add constraint FKUSERMODULEID511
        foreign key ("USER_ID")
        references DT511
        on delete cascade
        deferrable
        novalidate;
    alter table USERMODULE enable validate constraint FKUSERMODULEID511;

    create index IDX_USERMODULEID405 on USERMODULE ("MODULE");

    create index IDX_USERMODULEID511 on USERMODULE ("USER_ID");

    alter table USERMODULE MODIFY ("UUID" DEFAULT SYS_GUID());

    alter table USERMODULE
        add constraint DT170UUID_NOT_NULL check("UUID" is not null);

    alter table USERMODULE MODIFY ("OS_CREATED_ON" DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY'));

    alter table USERMODULE MODIFY ("OS_MODIFIED_ON" DEFAULT TO_DATE('01.01.1970','DD.MM.YYYY'));

    alter table USERMODULE MODIFY ("OS_RWDU" DEFAULT 0);

    alter table USERMODULE MODIFY ("OS_OWNER" DEFAULT 0);

    alter table USERMODULE MODIFY ("OS_GROUP" DEFAULT 0);

    alter table USERMODULE MODIFY ("OS_ANY" DEFAULT 0);

    alter table USERMODULE MODIFY ("AREA" DEFAULT 0);

    alter table USERMODULE MODIFY ("LOAD_AUTOMATIC" DEFAULT 0);

    alter table USERMODULE MODIFY ("SHOW_IN_FURTHER" DEFAULT 0);
