From bb8b82e0c7e2fefca3f66e930db59b57e51312e4 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Tue, 9 Feb 2010 13:18:50 +0100 Subject: add new tables --- lib/githubexplorer/Schema/Result/Fork.pm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/githubexplorer/Schema/Result/Fork.pm (limited to 'lib/githubexplorer/Schema/Result/Fork.pm') diff --git a/lib/githubexplorer/Schema/Result/Fork.pm b/lib/githubexplorer/Schema/Result/Fork.pm new file mode 100644 index 0000000..195c1f9 --- /dev/null +++ b/lib/githubexplorer/Schema/Result/Fork.pm @@ -0,0 +1,29 @@ +package githubexplorer::Schema::Result::Fork; + +use base qw/DBIx::Class/; + +__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' }, +); + +__PACKAGE__->set_primary_key( + qw/repo_origin repo_dest profile_origin profile_dest/ ); + +__PACKAGE__->belongs_to( 'profile_origin', + 'githubexplorer::Schema::Result::Profiles' ); +__PACKAGE__->belongs_to( 'profile_dest', + 'githubexplorer::Schema::Result::Profiles' ); + +__PACKAGE__->belongs_to( 'repo_origin', + 'githubexplorer::Schema::Result::Repositories' ); +__PACKAGE__->belongs_to( 'repo_dest', + 'githubexplorer::Schema::Result::Repositories' ); + +1; + -- cgit 1.4.1