-- Migrate DB from version 1

CREATE TABLE PushRequest (
    pushDate INTEGER NOT NULL,
    providerInfo TEXT NOT NULL,
    eventId TEXT NOT NULL,
    roomId TEXT NOT NULL,
    sessionId TEXT NOT NULL,
    status INTEGER NOT NULL DEFAULT 0,
    retries INTEGER NOT NULL DEFAULT 0,
    PRIMARY KEY(sessionId, eventId)
);

CREATE INDEX PushRequestSessionAndStatus ON PushRequest (sessionId, status);
