5f1d99f0e391ca425cd1c40b6eb86e80382febea
[dbsrgits/DBIx-Class-InflateColumn-IP.git] / t / lib / DBICTest / Schema / Host.pm
1 package # hide from PAUSE
2     DBICTest::Schema::Host;
3
4 use base qw/DBIx::Class/;
5
6 __PACKAGE__->load_components(qw/InflateColumn::IP Core/);
7 __PACKAGE__->table('host');
8
9 __PACKAGE__->add_columns(
10     hostname => {
11         data_type   => 'text',
12         is_nullable => 0,
13     },
14     address => {
15         data_type   => 'integer',
16         is_nullable => 0,
17         is_ip       => 1,
18     }
19 );
20
21 __PACKAGE__->set_primary_key('hostname');
22 __PACKAGE__->add_unique_constraint(address => [ qw/address/ ]);
23
24 1;