|
Lines 32-37
__PACKAGE__->table("biblio_framework");
Link Here
|
| 32 |
|
32 |
|
| 33 |
the unique code assigned to the framework |
33 |
the unique code assigned to the framework |
| 34 |
|
34 |
|
|
|
35 |
=head2 parent_frameworkcode |
| 36 |
|
| 37 |
data_type: 'varchar' |
| 38 |
is_foreign_key: 1 |
| 39 |
is_nullable: 1 |
| 40 |
size: 4 |
| 41 |
|
| 35 |
=head2 frameworktext |
42 |
=head2 frameworktext |
| 36 |
|
43 |
|
| 37 |
data_type: 'varchar' |
44 |
data_type: 'varchar' |
|
Lines 46-51
the description/name given to the framework
Link Here
|
| 46 |
__PACKAGE__->add_columns( |
53 |
__PACKAGE__->add_columns( |
| 47 |
"frameworkcode", |
54 |
"frameworkcode", |
| 48 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 4 }, |
55 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 4 }, |
|
|
56 |
"parent_frameworkcode", |
| 57 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 4 }, |
| 49 |
"frameworktext", |
58 |
"frameworktext", |
| 50 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, |
59 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, |
| 51 |
); |
60 |
); |
|
Lines 62-70
__PACKAGE__->add_columns(
Link Here
|
| 62 |
|
71 |
|
| 63 |
__PACKAGE__->set_primary_key("frameworkcode"); |
72 |
__PACKAGE__->set_primary_key("frameworkcode"); |
| 64 |
|
73 |
|
|
|
74 |
=head1 RELATIONS |
| 75 |
|
| 76 |
=head2 biblio_frameworks |
| 77 |
|
| 78 |
Type: has_many |
| 79 |
|
| 80 |
Related object: L<Koha::Schema::Result::BiblioFramework> |
| 81 |
|
| 82 |
=cut |
| 83 |
|
| 84 |
__PACKAGE__->has_many( |
| 85 |
"biblio_frameworks", |
| 86 |
"Koha::Schema::Result::BiblioFramework", |
| 87 |
{ "foreign.parent_frameworkcode" => "self.frameworkcode" }, |
| 88 |
{ cascade_copy => 0, cascade_delete => 0 }, |
| 89 |
); |
| 90 |
|
| 91 |
=head2 parent_frameworkcode |
| 92 |
|
| 93 |
Type: belongs_to |
| 94 |
|
| 95 |
Related object: L<Koha::Schema::Result::BiblioFramework> |
| 96 |
|
| 97 |
=cut |
| 98 |
|
| 99 |
__PACKAGE__->belongs_to( |
| 100 |
"parent_frameworkcode", |
| 101 |
"Koha::Schema::Result::BiblioFramework", |
| 102 |
{ frameworkcode => "parent_frameworkcode" }, |
| 103 |
{ |
| 104 |
is_deferrable => 1, |
| 105 |
join_type => "LEFT", |
| 106 |
on_delete => "SET NULL", |
| 107 |
on_update => "CASCADE", |
| 108 |
}, |
| 109 |
); |
| 65 |
|
110 |
|
| 66 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 |
111 |
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-12-01 16:19:52 |
| 67 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YdCNaeY5v1WcfcDuA6xE0w |
112 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ac+E/s6Yov29CJKDGovgNw |
| 68 |
|
113 |
|
| 69 |
# FIXME This should not be needed, we need to add the FK at DB level |
114 |
# FIXME This should not be needed, we need to add the FK at DB level |
| 70 |
# It cannot be done now because the default framework (frameworkcode=='') |
115 |
# It cannot be done now because the default framework (frameworkcode=='') |
| 71 |
- |
|
|