Bug 24474: (QA follow-up) Fix failing test
[koha.git] / Koha / Schema / Result / AdditionalFieldValue.pm
blob9dd368d7835fdc348c1a28db4a471afc435d559a
1 use utf8;
2 package Koha::Schema::Result::AdditionalFieldValue;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::AdditionalFieldValue
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<additional_field_values>
20 =cut
22 __PACKAGE__->table("additional_field_values");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 field_id
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 record_id
40 data_type: 'integer'
41 is_nullable: 0
43 =head2 value
45 data_type: 'varchar'
46 default_value: (empty string)
47 is_nullable: 0
48 size: 255
50 =cut
52 __PACKAGE__->add_columns(
53 "id",
54 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
55 "field_id",
56 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
57 "record_id",
58 { data_type => "integer", is_nullable => 0 },
59 "value",
60 { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
63 =head1 PRIMARY KEY
65 =over 4
67 =item * L</id>
69 =back
71 =cut
73 __PACKAGE__->set_primary_key("id");
75 =head1 UNIQUE CONSTRAINTS
77 =head2 C<field_record>
79 =over 4
81 =item * L</field_id>
83 =item * L</record_id>
85 =back
87 =cut
89 __PACKAGE__->add_unique_constraint("field_record", ["field_id", "record_id"]);
91 =head1 RELATIONS
93 =head2 field
95 Type: belongs_to
97 Related object: L<Koha::Schema::Result::AdditionalField>
99 =cut
101 __PACKAGE__->belongs_to(
102 "field",
103 "Koha::Schema::Result::AdditionalField",
104 { id => "field_id" },
105 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
109 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-10-02 15:12:02
110 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:a9G6nhDU9dBDcRRN0vzkLA
113 # You can replace this text with custom code or comments, and it will be preserved on regeneration