+) ENGINE=MyISAM;
+
+/* One-to-many relationship of user to openid_url */
+
+create table user_openid (
+ canonical varchar(255) primary key comment 'Canonical true URL',
+ display varchar(255) not null unique key comment 'URL for viewing, may be different from canonical',
+ user_id integer not null comment 'user owning this URL' references user (id),
+ created datetime not null comment 'date this record was created',
+ modified timestamp comment 'date this record was modified',
+
+ index user_openid_user_id_idx (user_id)
+) ENGINE=MyISAM;
+
+/* These are used by JanRain OpenID library */
+
+create table oid_associations (
+ server_url BLOB,
+ handle VARCHAR(255),
+ secret BLOB,
+ issued INTEGER,
+ lifetime INTEGER,
+ assoc_type VARCHAR(64),
+ PRIMARY KEY (server_url(255), handle)
+) ENGINE=MyISAM;
+
+create table oid_nonces (
+ server_url VARCHAR(2047),
+ timestamp INTEGER,
+ salt CHAR(40),
+ UNIQUE (server_url(255), timestamp, salt)
+) ENGINE=MyISAM;
+
+create table confirm_address (
+ code varchar(32) not null primary key comment 'good random code',
+ user_id integer not null comment 'user who requested confirmation' references user (id),
+ address varchar(255) not null comment 'address (email, Jabber, SMS, etc.)',
+ address_extra varchar(255) not null comment 'carrier ID, for SMS',
+ address_type varchar(8) not null comment 'address type ("email", "jabber", "sms")',
+ claimed datetime comment 'date this was claimed for queueing',
+ sent datetime comment 'date this was sent for queueing',
+ modified timestamp comment 'date this record was modified'
+) ENGINE=MyISAM;
+
+create table remember_me (
+ code varchar(32) not null primary key comment 'good random code',
+ user_id integer not null comment 'user who is logged in' references user (id),
+ modified timestamp comment 'date this record was modified'
+) ENGINE=MyISAM;
+
+create table queue_item (
+
+ notice_id integer not null primary key comment 'notice queued' references notice (id),
+ transport varchar(8) not null comment 'queue for what? "email", "jabber", "sms", "irc", ...',
+ created datetime not null comment 'date this record was created',
+ claimed datetime comment 'date this item was claimed',
+
+ index queue_item_created_idx (created)
+
+) ENGINE=MyISAM;
+