Last active
December 30, 2015 11:29
-
-
Save hexfusion/7823182 to your computer and use it in GitHub Desktop.
proposed country table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use utf8; | |
package Interchange6::Schema::Result::Country; | |
# Created by DBIx::Class::Schema::Loader | |
# DO NOT MODIFY THE FIRST PART OF THIS FILE | |
=head1 NAME | |
Interchange6::Schema::Result::Country | |
=cut | |
use strict; | |
use warnings; | |
use base 'DBIx::Class::Core'; | |
=head1 TABLE: C<country> | |
=cut | |
=head1 DESCRIPTION | |
ISO 3166-1 codes for country identification | |
B<iso_code:> Two letter country code such as 'sl' = Slovenia. | |
B<scope:> Internal sorting field. | |
B<name:> Full country name. | |
B<priority:> Display sorting. | |
B<active:> Is this country a shipping destination. | |
=cut | |
__PACKAGE__->table("country"); | |
=head1 ACCESSORS | |
=head2 iso_code | |
data_type: 'varchar' | |
default_value: (empty string) | |
is_nullable: 0 | |
size: 2 | |
=head2 scope | |
data_type: 'varchar' | |
default_value: (empty string) | |
is_nullable: 0 | |
size: 32 | |
=head2 name | |
data_type: 'varchar' | |
default_value: (empty string) | |
is_nullable: 0 | |
size: 255 | |
=head2 priority | |
data_type: 'integer' | |
default_value: 0 | |
is_nullable: 0 | |
=head2 show_state | |
data_type: 'boolean' | |
default_value: true | |
is_nullable: 0 | |
=head2 active | |
data_type: 'boolean' | |
default_value: true | |
is_nullable: 0 | |
=cut | |
__PACKAGE__->add_columns( | |
"iso_code", | |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 2 }, | |
"scope", | |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 32 }, | |
"name", | |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, | |
"priority", | |
{ data_type => "integer", default_value => 0, is_nullable => 0 }, | |
"show_states", | |
{ data_type => "boolean", default_value => \"true", is_nullable => 0 }, | |
"active", | |
{ data_type => "boolean", default_value => \"true", is_nullable => 0 }, | |
); | |
=head1 PRIMARY KEY | |
=over 4 | |
=item * L</iso_code> | |
=back | |
=cut | |
__PACKAGE__->set_primary_key("iso_code"); | |
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-12-06 07:40:36 | |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4ycBkFKPUPXEOv3/IfNayw | |
# You can replace this text with custom code or comments, and it will be preserved on regeneration | |
1; |
revision 13 for submission
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
revision 2 increase name size to 128 to accommodate longer names