CREATE TABLE ZCALLDBPROPERTIES (
    Z_PK INTEGER PRIMARY KEY,
    Z_ENT INTEGER,
    Z_OPT INTEGER,
    ZTIMER_ALL FLOAT,
    ZTIMER_INCOMING FLOAT,
    ZTIMER_LAST FLOAT,
    ZTIMER_LIFETIME FLOAT,
    ZTIMER_OUTGOING FLOAT
);
CREATE TABLE ZCALLRECORD (
    Z_PK INTEGER PRIMARY KEY,
    Z_ENT INTEGER,
    Z_OPT INTEGER,
    ZANSWERED INTEGER,
    ZCALL_CATEGORY INTEGER,
    ZCALLTYPE INTEGER,
    ZDISCONNECTED_CAUSE INTEGER,
    ZFACE_TIME_DATA INTEGER,
    ZHANDLE_TYPE INTEGER,
    ZNUMBER_AVAILABILITY INTEGER,
    ZORIGINATED INTEGER,
    ZREAD INTEGER,
    ZDATE TIMESTAMP,
    ZDURATION FLOAT,
    ZDEVICE_ID VARCHAR,
    ZISO_COUNTRY_CODE VARCHAR,
    ZLOCATION VARCHAR,
    ZNAME VARCHAR,
    ZSERVICE_PROVIDER VARCHAR,
    ZUNIQUE_ID VARCHAR UNIQUE,
    ZADDRESS BLOB
);
CREATE INDEX ZCALLRECORD_ZDATE_INDEX ON ZCALLRECORD (ZDATE);
CREATE TABLE Z_PRIMARYKEY (
    Z_ENT INTEGER PRIMARY KEY,
    Z_NAME VARCHAR,
    Z_SUPER INTEGER,
    Z_MAX INTEGER);
CREATE TABLE Z_METADATA (
    Z_VERSION INTEGER PRIMARY KEY,
    Z_UUID VARCHAR(255),
    Z_PLIST BLOB
);
CREATE TABLE Z_MODELCACHE (Z_CONTENT BLOB);
