CREATE TABLE HISTORICAL_EVENT
(
    ID        varchar PRIMARY KEY,
    TYPE      varchar  NOT NULL,
    BOOK_ID   varchar  NULL,
    SERIES_ID varchar  NULL,
    TIMESTAMP datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE HISTORICAL_EVENT_PROPERTIES
(
    ID    varchar NOT NULL,
    KEY   varchar NOT NULL,
    VALUE varchar NOT NULL,
    PRIMARY KEY (ID, KEY),
    FOREIGN KEY (ID) REFERENCES HISTORICAL_EVENT (ID)
);
