CREATE TYPE discovery_type AS ENUM ( 'instance', 'repository' ); CREATE TABLE IF NOT EXISTS discoveries ( discovery_hash TEXT PRIMARY KEY UNIQUE NOT NULL, discovery_time TEXT NOT NULL, discovery_type discovery_type NOT NULL, discovery TEXT NOT NULL );