- $schema->ensureTable('user_openid',
- array(new ColumnDef('canonical', 'varchar',
- '255', false, 'PRI'),
- new ColumnDef('display', 'varchar',
- '255', false, 'UNI'),
- new ColumnDef('user_id', 'integer',
- null, false, 'MUL'),
- new ColumnDef('created', 'datetime',
- null, false),
- new ColumnDef('modified', 'timestamp')));
- $schema->ensureTable('user_openid_trustroot',
- array(new ColumnDef('trustroot', 'varchar',
- '255', false, 'PRI'),
- new ColumnDef('user_id', 'integer',
- null, false, 'PRI'),
- new ColumnDef('created', 'datetime',
- null, false),
- new ColumnDef('modified', 'timestamp')));
+ $schema->ensureTable('user_openid', User_openid::schemaDef());
+ $schema->ensureTable('user_openid_trustroot', User_openid_trustroot::schemaDef());
+ $schema->ensureTable('user_openid_prefs', User_openid_prefs::schemaDef());
+
+ /* These are used by JanRain OpenID library */
+
+ $schema->ensureTable('oid_associations',
+ array(
+ 'fields' => array(
+ 'server_url' => array('type' => 'blob', 'not null' => true),
+ 'handle' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'default' => ''), // character set latin1,
+ 'secret' => array('type' => 'blob'),
+ 'issued' => array('type' => 'int'),
+ 'lifetime' => array('type' => 'int'),
+ 'assoc_type' => array('type' => 'varchar', 'length' => 64),
+ ),
+ 'primary key' => array(array('server_url', 255), 'handle'),
+ ));
+ $schema->ensureTable('oid_nonces',
+ array(
+ 'fields' => array(
+ 'server_url' => array('type' => 'varchar', 'length' => 2047),
+ 'timestamp' => array('type' => 'int'),
+ 'salt' => array('type' => 'char', 'length' => 40),
+ ),
+ 'unique keys' => array(
+ 'oid_nonces_server_url_timestamp_salt_key' => array(array('server_url', 255), 'timestamp', 'salt'),
+ ),
+ ));
+