
    create table PULSE (
        "UUID" raw(16) not null,
        "PLANTA_ID" raw(16) not null,
        "PULSE_ID" varchar2(50 char) not null,
        "PULSE_TYPE" varchar2(50 char)
    ) INITRANS 5 MAXTRANS 255;

    alter table PULSE add constraint PID597DT597 primary key ("UUID");

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

    alter table PULSE 
        add constraint DT597UUID_NOT_NULL check("UUID" is not null);

    alter table PULSE 
        add constraint DT597PLANTA_ID_NOT_NULL check("PLANTA_ID" is not null);

    alter table PULSE 
        add constraint DT597PULSE_ID_NOT_NULL check("PULSE_ID" is not null);

    alter table DT463 add PULSE_RELEVANT number(5,0);

    alter table DT463 MODIFY ("PULSE_RELEVANT" DEFAULT 0);

    update DT463 set PULSE_RELEVANT = DEFAULT;


    create table PULSESUBSCRIPTION (
        "UUID" raw(16) not null,
        "MAPPING" raw(16),
        "SUBSCRIPTION" varchar2(50 char),
        "SUBSCRIPTION_TYPE" varchar2(50 char)
    ) INITRANS 5 MAXTRANS 255;

    alter table PULSESUBSCRIPTION add constraint PID598DT598 primary key ("UUID");

    alter table PULSESUBSCRIPTION
        add constraint FKPULSESUBSCRIPTIONID597
        foreign key ("MAPPING")
        references PULSE
        on delete cascade
        deferrable
        novalidate;

    alter table PULSESUBSCRIPTION enable validate constraint FKPULSESUBSCRIPTIONID597;

    create index IDX_PULSESUBSCRIPTIONID597 on PULSESUBSCRIPTION ("MAPPING");

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

    alter table PULSESUBSCRIPTION
        add constraint DT598UUID_NOT_NULL check("UUID" is not null);
