Hi,

I just downloaded and installed the latest (user_relationships-5.x-1.x-dev) and I got errors right away that some tables weren't created. That appears from the README to be a known issue, so I followed the instructions and ran the sql at the end of the file. I think the sql listed there is stale though, so I had to poke around and recreated the following to use:

--
-- Table structure for table `user_relationships`
--
CREATE TABLE IF NOT EXISTS `user_relationships` (
`rid` int(10) unsigned NOT NULL default '0',
`requester_id` int(11) NOT NULL default '0',
`requestee_id` int(11) NOT NULL default '0',
`rtid` int(11) NOT NULL default '0',
`approved` tinyint(1) NOT NULL default '0',
`created_at` datetime NOT NULL,
`updated_at` timestamp NOT NULL,
PRIMARY KEY (`rid`),
KEY `requester_id` (`requester_id`),
KEY `requestee_id` (`requestee_id`),
KEY `rtid` (`rtid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `user_relationship_types`
--
CREATE TABLE IF NOT EXISTS `user_relationship_types` (
`rtid` int(10) unsigned NOT NULL default '0',
`name` varchar(255) NOT NULL default '',
`plural_name` varchar(255) NOT NULL default '',
`is_oneway` tinyint(1) NOT NULL default '0',
`requires_approval` tinyint(1) NOT NULL default '0',
`expires_val` int(10) unsigned NOT NULL default 0,
PRIMARY KEY (`rtid`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `cache_user_relationships`
--
CREATE TABLE IF NOT EXISTS `cache_user_relationships` (
`cid` varchar(255) NOT NULL default '',
`data` longblob,
`expire` int(11) NOT NULL default 0,
`created` int(11) NOT NULL default 0,
`headers` text,
`serialized` int(1) NOT NULL default 0,
PRIMARY KEY (`cid`),
KEY `expire` (`expire`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Seems okay now, but you might want to update the README for the next release.

Thanks,
Zaz

Comments

sprsquish’s picture

Status: Active » Fixed

Thanks for the catch and the code.

sprsquish’s picture

Status: Fixed » Closed (fixed)