BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE DOCUMENT (
    ID RAW(16) NOT NULL,
    "Number" NUMBER GENERATED ALWAYS AS IDENTITY,
    NAME NVARCHAR2(256) NOT NULL,
    "Comment" NCLOB NULL,
    AUTHORID RAW(16) NOT NULL,
    MANAGERID RAW(16) NULL,
    SUM NUMBER(19,4) DEFAULT 0 NOT NULL,
    STATE NVARCHAR2(1024) DEFAULT ''VacationRequestCreated'' NOT NULL,
    STATENAME NVARCHAR2(1024) ,
    CONSTRAINT PK_DOCUMENT PRIMARY KEY (ID) USING INDEX STORAGE (INITIAL 64K NEXT 1M MAXEXTENTS UNLIMITED),
    CONSTRAINT FK_DOCUMENT_AUTHORID FOREIGN KEY (AUTHORID) REFERENCES EMPLOYEE(ID),
    CONSTRAINT FK_DOCUMENT_MANAGERID FOREIGN KEY (MANAGERID) REFERENCES EMPLOYEE(ID)
) LOGGING';
END;