

CREATE TABLE IF NOT EXISTS parcels (
    room        TEXT,
    event_orig  TEXT,
    event_qr    TEXT,
    operator    TEXT,
    id          TEXT,
    code        TEXT,
    phone       TEXT,
    ref         TEXT,
    time_start  TEXT,
    time_end    TEXT
) STRICT;

CREATE TABLE IF NOT EXISTS parcel_points (
    operator    TEXT,
    ref         TEXT,
    lat         REAL NOT NULL,
    lon         REAL NUT NULL,

    PRIMARY KEY (operator, ref)
) STRICT;

CREATE TABLE IF NOT EXISTS phone_numbers (
    user_id     TEXT PRIMARY KEY,
    phone       TEXT
) STRICT;
