CREATE TABLE libraryUpdateErrorMessage (
    _id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    message TEXT NOT NULL UNIQUE
);

getAllErrorMessages:
SELECT *
FROM libraryUpdateErrorMessage;

getErrorMessages:
SELECT *
FROM libraryUpdateErrorMessage WHERE message == :message;

insertAndGet {
    -- Insert the message if it doesn't exist already
    INSERT OR IGNORE INTO libraryUpdateErrorMessage(message)
    VALUES (:message);

    -- Finally return the message ID
    SELECT _id
    FROM libraryUpdateErrorMessage
    WHERE message = :message
    LIMIT 1;
}

deleteAllErrorMessages:
DELETE FROM libraryUpdateErrorMessage;
