CREATE TABLE IF NOT EXISTS urls ( id INTEGER PRIMARY KEY AUTOINCREMENT, url TEXT NOT NULL, timestamp TEXT NOT NULL ); CREATE TABLE IF NOT EXISTS item_log ( id INTEGER PRIMARY KEY AUTOINCREMENT, module TEXT NOT NULL, name TEXT NOT NULL, url TEXT NOT NULL, timestamp TEXT NOT NULL, CONSTRAINT unique_module_name_url UNIQUE (module, name, url) );