DBIx-Class-Schema-Diff

 view release on metacpan or  search on metacpan

t/lib/TestSchema/Sakila2/Result/City.pm  view on Meta::CPAN

  is_nullable: 0
  size: 50

=head2 country_id

  data_type: 'smallint'
  extra: {unsigned => 1}
  is_foreign_key: 1
  is_nullable: 0

=head2 last_update

  data_type: 'timestamp'
  datetime_undef_if_invalid: 1
  default_value: current_timestamp
  is_nullable: 0

=cut

__PACKAGE__->add_columns(
  "city_id",
  {
    data_type => "smallint",
    extra => { unsigned => 1 },
    is_auto_increment => 1,
    is_nullable => 0,
  },
  "city",
  { data_type => "varchar", is_nullable => 0, size => 50 },
  "country_id",
  {
    data_type => "smallint",
    extra => { unsigned => 1 },
    is_foreign_key => 1,
    is_nullable => 0,
  },
  "last_update",
  {
    data_type => "timestamp",
    datetime_undef_if_invalid => 1,
    default_value => \"current_timestamp",
    is_nullable => 0,
  },
);
__PACKAGE__->set_primary_key("city_id");

=head1 RELATIONS

=head2 addresses

Type: has_many

Related object: L<TestSchema::Sakila2::Result::Address>

=cut

__PACKAGE__->has_many(
  "addresses",
  "TestSchema::Sakila2::Result::Address",
  { "foreign.city_id" => "self.city_id" },
  { cascade_copy => 0, cascade_delete => 0 },
);

=head2 country

Type: belongs_to

Related object: L<TestSchema::Sakila2::Result::Country>

=cut

__PACKAGE__->belongs_to(
  "country",
  "TestSchema::Sakila2::Result::Country",
  { country_id => "country_id" },
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);


# Created by DBIx::Class::Schema::Loader v0.07010 @ 2013-02-17 16:15:04
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:w4xTOE/lSOimM/siQtWn5w


# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;



( run in 2.985 seconds using v1.01-cache-2.11-cpan-d8267643d1d )