missing svk add
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / TreeLike.pm
1 package DBICTest::Schema::TreeLike;
2
3 use base qw/DBIx::Class/;
4
5 __PACKAGE__->load_components(qw/PK::Auto::SQLite Core/);
6
7 __PACKAGE__->table('treelike');
8 __PACKAGE__->add_columns(
9   'id' => { data_type => 'integer', is_auto_increment => 1 },
10   'parent' => { data_type => 'integer' },
11   'name' => { data_type => 'varchar' },
12 );
13 __PACKAGE__->set_primary_key(qw/id/);
14 __PACKAGE__->belongs_to('parent', 'TreeLike',
15                           { 'foreign.id' => 'self.parent' });
16
17 1;