summary refs log tree commit diff
path: root/lib/githubexplorer
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-02-10 11:07:41 +0100
committerfranck cuny <franck@lumberjaph.net>2010-02-10 11:07:41 +0100
commitc55a169ead9beb27436144923255c254d215158f (patch)
treef7e87d641692bae116f2600ad020b62b5868142f /lib/githubexplorer
parentadd opt to create network (diff)
downloadgithub-explorer-c55a169ead9beb27436144923255c254d215158f.tar.gz
update to create graph
Diffstat (limited to 'lib/githubexplorer')
-rw-r--r--lib/githubexplorer/Repository.pm1
-rw-r--r--lib/githubexplorer/Schema/Result/Fork.pm17
2 files changed, 5 insertions, 13 deletions
diff --git a/lib/githubexplorer/Repository.pm b/lib/githubexplorer/Repository.pm
index 664d727..035450a 100644
--- a/lib/githubexplorer/Repository.pm
+++ b/lib/githubexplorer/Repository.pm
@@ -2,7 +2,6 @@ package githubexplorer::Repository;
 use 5.010;
 use Moose::Role;
 use Net::GitHub::V2::Repositories;
-use YAML::Syck;
 
 sub fetch_repositories {
     my ( $self, $profile ) = @_;
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;