On Wed, Sep 28, 2011 at 3:50 PM, Fabien COMBERNOUS <[email protected]> wrote: > # Table structure for table 'radgroupcheck' > @@ -117,8 +117,10 @@ > username varchar(64) NOT NULL default '', > groupname varchar(64) NOT NULL default '', > priority int(11) NOT NULL default '1', > - KEY username (username(32)) > -) ; > + INDEX username (username),
You should stick with either "KEY" or "INDEX" for consistency (although both are synonyms in mysql). > + FOREIGN KEY (`username`) REFERENCES radcheck(username) > + ON DELETE CASCADE ON UPDATE CASCADE > +) ENGINE=InnoDB; If you use foreign key for radgroupcheck, is there a reason not to use it on other tables (e.g. radreply, radgroupreply)? One exception might be radacct, where you might want to keep accounting records even for old/deleted accounts. -- Fajar - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

