CREATE TABLE IF NOT EXISTS runs ( id INTEGER NOT NULL PRIMARY KEY, feed INTEGER NOT NULL, fetched DATETIME NOT NULL DEFAULT current_timestamp, posted DATETIME, -- once this becomes non-null, the program will ensure it will never be null again FOREIGN KEY (feed) REFERENCES feeds(id) );