[Bast-commits] r4622 - in DBIx-Class-Tree-NestedSet: . t t/lib
t/lib/TestSchema
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Fri Jul 25 01:43:05 BST 2008
Author: rafl
Date: 2008-07-25 01:43:05 +0100 (Fri, 25 Jul 2008)
New Revision: 4622
Added:
DBIx-Class-Tree-NestedSet/t/
DBIx-Class-Tree-NestedSet/t/lib/
DBIx-Class-Tree-NestedSet/t/lib/TestSchema.pm
DBIx-Class-Tree-NestedSet/t/lib/TestSchema/
DBIx-Class-Tree-NestedSet/t/lib/TestSchema/Tree.pm
Log:
A simple test schema.
Added: DBIx-Class-Tree-NestedSet/t/lib/TestSchema/Tree.pm
===================================================================
--- DBIx-Class-Tree-NestedSet/t/lib/TestSchema/Tree.pm (rev 0)
+++ DBIx-Class-Tree-NestedSet/t/lib/TestSchema/Tree.pm 2008-07-25 00:43:05 UTC (rev 4622)
@@ -0,0 +1,33 @@
+use strict;
+use warnings;
+
+package TestSchema::Tree;
+
+use parent 'DBIx::Class';
+
+__PACKAGE__->load_components(qw/Tree::NestedSet Core/);
+__PACKAGE__->table('tree');
+
+__PACKAGE__->tree_columns({
+ root_column => 'root',
+ left_column => 'lft',
+ right_column => 'rgt',
+});
+
+__PACKAGE__->add_columns(
+ id => {
+ data_type => 'integer',
+ is_auto_increment => 1,
+ },
+ root => {
+ data_type => 'integer',
+ is_nullable => 1,
+ },
+ lft => { data_type => 'integer' },
+ rgt => { data_type => 'integer' },
+ content => { data_type => 'text' },
+);
+
+__PACKAGE__->set_primary_key(qw/id/);
+
+1;
Added: DBIx-Class-Tree-NestedSet/t/lib/TestSchema.pm
===================================================================
--- DBIx-Class-Tree-NestedSet/t/lib/TestSchema.pm (rev 0)
+++ DBIx-Class-Tree-NestedSet/t/lib/TestSchema.pm 2008-07-25 00:43:05 UTC (rev 4622)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+
+package TestSchema;
+
+use parent 'DBIx::Class::Schema';
+
+__PACKAGE__->load_classes;
+
+1;
More information about the Bast-commits
mailing list