mysql> create table user_role ( -> id int(11) not null primary key auto_increment, -> user_id int(11) not null default '0', -> role_id int(11) not null default '0', -> foreign key user_fk (user_id) references user (id), -> foreign key role_fk (role_id) references role (id) -> ); #### __PACKAGE__->columns( All => qw/ id user_id role_id / );