/* tag 14 */
create table public_subkey (
	packet_id INT ,
	pubkey INT,

	/* parsed from subkey */
	modlength INT,
	alg INT,
	created DATETIME,
	expires DATETIME,
	flags INT,

	/* computed from subkey */
	keyid VARCHAR(8),
	fingerprint VARCHAR(20),

	INDEX (pubkey)
);

/* tag 2 type 0x20 */
create table self_signature_revocation (
	packet_id INT,
	pubkey INT,

	/* parsed from signature */
	issuer VARCHAR(8),

	INDEX (pubkey),
	INDEX (issuer)
);

/* tag 2, type 0x10-0x13 */
create table user_id_signature (
	packet_id INT,
	userid INT,

	/* parsed from signature */
	issuer VARCHAR(8),
	created DATETIME,

	/* parsed from the primary user id subpacket, if the
	   subpacket is a self-sig */
	primary INT, /* boolean */

	INDEX (userid),
	INDEX (created)
);

/* type 2 tag 0x30 */
/*
create table userid_cert_revoke (
	packet_id INT,
	userid_cert INT
);
*/
