From c55a169ead9beb27436144923255c254d215158f Mon Sep 17 00:00:00 2001 From: franck cuny Date: Wed, 10 Feb 2010 11:07:41 +0100 Subject: update to create graph --- lib/githubexplorer/Schema/Result/Fork.pm | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'lib/githubexplorer/Schema') diff --git a/lib/githubexplorer/Schema/Result/Fork.pm b/lib/githubexplorer/Schema/Result/Fork.pm index 195c1f9..2a798eb 100644 --- a/lib/githubexplorer/Schema/Result/Fork.pm +++ b/lib/githubexplorer/Schema/Result/Fork.pm @@ -6,23 +6,16 @@ __PACKAGE__->load_components(qw/Core/); __PACKAGE__->table('fork'); __PACKAGE__->add_columns( - profile_origin => { data_type => 'int', }, - profile_dest => { data_type => 'int' }, - repo_origin => { data_type => 'int' }, - repo_dest => { data_type => 'int' }, + profile => { data_type => 'int', }, + repos => { data_type => 'int' }, ); -__PACKAGE__->set_primary_key( - qw/repo_origin repo_dest profile_origin profile_dest/ ); +__PACKAGE__->set_primary_key(qw/repos profile/); -__PACKAGE__->belongs_to( 'profile_origin', - 'githubexplorer::Schema::Result::Profiles' ); -__PACKAGE__->belongs_to( 'profile_dest', +__PACKAGE__->belongs_to( 'profile', 'githubexplorer::Schema::Result::Profiles' ); -__PACKAGE__->belongs_to( 'repo_origin', - 'githubexplorer::Schema::Result::Repositories' ); -__PACKAGE__->belongs_to( 'repo_dest', +__PACKAGE__->belongs_to( 'repos', 'githubexplorer::Schema::Result::Repositories' ); 1; -- cgit 1.4.1