Commit | Line | Data |
3a889a03 |
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 | ip_format => 'numeric', |
19 | } |
20 | ); |
21 | |
22 | __PACKAGE__->set_primary_key('hostname'); |
23 | __PACKAGE__->add_unique_constraint(address => [ qw/address/ ]); |
24 | |
25 | 1; |