Added table for storing postcodes
This commit is contained in:
parent
119774e434
commit
5a80d57ca2
1 changed files with 38 additions and 0 deletions
38
lib/Pear/LocalLoop/Schema/Result/GbPostcode.pm
Normal file
38
lib/Pear/LocalLoop/Schema/Result/GbPostcode.pm
Normal file
|
@ -0,0 +1,38 @@
|
|||
package Pear::LocalLoop::Schema::Result::GbPostcode;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use base 'DBIx::Class::Core';
|
||||
|
||||
__PACKAGE__->table('gb_postcodes');
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
outcode => {
|
||||
data_type => 'char',
|
||||
size => 4,
|
||||
is_nullable => 0,
|
||||
},
|
||||
incode => {
|
||||
data_type => 'char',
|
||||
size => 3,
|
||||
is_nullable => 0,
|
||||
default_value => '',
|
||||
},
|
||||
latitude => {
|
||||
data_type => 'decimal',
|
||||
size => [7,5],
|
||||
is_nullable => 1,
|
||||
default_value => undef,
|
||||
},
|
||||
longitude => {
|
||||
data_type => 'decimal',
|
||||
size => [7,5],
|
||||
is_nullable => 1,
|
||||
default_value => undef,
|
||||
},
|
||||
);
|
||||
|
||||
__PACKAGE__->set_primary_key(qw/ outcode incode /);
|
||||
|
||||
1;
|
Reference in a new issue