initial import of DBIx-Class-InflateColumn-IP 0.02000 from CPAN
[dbsrgits/DBIx-Class-InflateColumn-IP.git] / t / lib / DBICTest / Schema / Network.pm
1 package # hide from PAUSE
2     DBICTest::Schema::Network;
3
4 use base qw/DBIx::Class/;
5
6 __PACKAGE__->load_components(qw/InflateColumn::IP Core/);
7 __PACKAGE__->table('network');
8
9 __PACKAGE__->add_columns(
10     netname => {
11         data_type   => 'text',
12         is_nullable => 0,
13     },
14     address => {
15         data_type   => 'varchar',
16         size        => '18',
17         is_nullable => 0,
18         is_ip       => 1,
19         ip_format   => 'cidr',
20     }
21 );
22
23 __PACKAGE__->set_primary_key('netname');
24 __PACKAGE__->add_unique_constraint(address => [ qw/address/ ]);
25
26 1;