package Orchard::DB::Schema::ArtRelations::Country;

use strict;
use warnings;

use lib '/var/app/orchard/collab/jgetter/perllib';
use base 'Orchard::DB::DBIxCore';

## table
__PACKAGE__->table('art_relations.country');

## columns
__PACKAGE__->add_columns(
    'id' => {'is_auto_increment'=>1,'data_type'=>'smallint','is_nullable'=>0},
    'name' => {'data_type'=>'varchar','is_nullable'=>0},
    'country_code' => {'data_type'=>'char','is_nullable'=>1},
    'abbrivation' => {'data_type'=>'char','is_nullable'=>0},
    'continent' => {'data_type'=>'enum','is_nullable'=>0},
    'latitude' => {'data_type'=>'decimal','is_nullable'=>1},
    'longitude' => {'data_type'=>'decimal','is_nullable'=>1},
    'iso3166a3' => {'data_type'=>'char','is_nullable'=>1},
    'continent_id' => {'data_type'=>'tinyint','is_nullable'=>1}
);

## primary key
__PACKAGE__->set_primary_key('id');

## unique key (country_code)
__PACKAGE__->add_unique_constraint('country_code' => [qw/country_code/]);

1;
