File: Host.pm

package info (click to toggle)
libdbix-class-inflatecolumn-ip-perl 0.02003-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196 kB
  • sloc: perl: 1,612; sql: 8; makefile: 6
file content (24 lines) | stat: -rw-r--r-- 499 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package # hide from PAUSE
    DBICTest::Schema::Host;

use base qw/DBIx::Class/;

__PACKAGE__->load_components(qw/InflateColumn::IP Core/);
__PACKAGE__->table('host');

__PACKAGE__->add_columns(
    hostname => {
        data_type   => 'text',
        is_nullable => 0,
    },
    address => {
        data_type   => 'bigint',
        is_nullable => 0,
        is_ip       => 1,
    }
);

__PACKAGE__->set_primary_key('hostname');
__PACKAGE__->add_unique_constraint(address => [ qw/address/ ]);

1;