From 6d7f6ee986a535f3cc561ed4ec6c1447ef7354ad Mon Sep 17 00:00:00 2001 From: franck cuny Date: Mon, 1 Feb 2010 09:46:51 +0100 Subject: update how we follow profiles --- lib/githubexplorer/Schema/Result/Follow.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/githubexplorer/Schema') diff --git a/lib/githubexplorer/Schema/Result/Follow.pm b/lib/githubexplorer/Schema/Result/Follow.pm index 735980b..69b9596 100644 --- a/lib/githubexplorer/Schema/Result/Follow.pm +++ b/lib/githubexplorer/Schema/Result/Follow.pm @@ -6,13 +6,12 @@ __PACKAGE__->load_components(qw/Core/); __PACKAGE__->table('follow'); __PACKAGE__->add_columns( - id_follower => { data_type => 'int', }, - id_following => { data_type => 'int' }, + origin => { data_type => 'int', }, + dest => { data_type => 'int' }, ); -__PACKAGE__->set_primary_key(qw/id_follower id_following/); -__PACKAGE__->belongs_to( 'id_follower', - 'githubexplorer::Schema::Result::Profiles' ); -__PACKAGE__->belongs_to( 'id_following', +__PACKAGE__->set_primary_key(qw/origin dest/); +__PACKAGE__->belongs_to( 'origin', 'githubexplorer::Schema::Result::Profiles' ); +__PACKAGE__->belongs_to( 'dest', 'githubexplorer::Schema::Result::Profiles' ); 1; -- cgit 1.4.1