Bugzilla – Attachment 102328 Details for
Bug 4461
Add a context-sensitive report a problem process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4461: DBIC Schema Files
Bug-4461-DBIC-Schema-Files.patch (text/plain), 6.46 KB, created by
David Nind
on 2020-04-02 20:10:08 UTC
(
hide
)
Description:
Bug 4461: DBIC Schema Files
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-04-02 20:10:08 UTC
Size:
6.46 KB
patch
obsolete
>From 489199d09829d3f74296e842550e7782a76c8d70 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 11 Mar 2020 09:08:52 +0000 >Subject: [PATCH] Bug 4461: DBIC Schema Files > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/Schema/Result/Borrower.pm | 19 +++- > Koha/Schema/Result/Branch.pm | 19 +++- > Koha/Schema/Result/ProblemReport.pm | 189 ++++++++++++++++++++++++++++++++++++ > 3 files changed, 223 insertions(+), 4 deletions(-) > create mode 100644 Koha/Schema/Result/ProblemReport.pm > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 92a91b2b91..b3c8a01dd0 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -1327,6 +1327,21 @@ __PACKAGE__->might_have( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 problem_reports >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::ProblemReport> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "problem_reports", >+ "Koha::Schema::Result::ProblemReport", >+ { "foreign.borrowernumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 ratings > > Type: has_many >@@ -1673,8 +1688,8 @@ Composing rels: L</aqorder_users> -> ordernumber > __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-24 12:04:30 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lc2beHgnH2egLaVzXEcLPg >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-01 09:42:50 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1G8678sy3UnvmJffzcU/Hg > > __PACKAGE__->add_columns( > '+anonymized' => { is_boolean => 1 }, >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index 7e1850ca6f..22d3172aae 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -638,6 +638,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 problem_reports >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::ProblemReport> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "problem_reports", >+ "Koha::Schema::Result::ProblemReport", >+ { "foreign.branchcode" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 repeatable_holidays > > Type: has_many >@@ -744,8 +759,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-25 09:27:24 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:r2wn2GewgIc5+ShIdgmd9g >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-01 09:42:50 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OK9rj4bv4KW5if0kLRDTSg > > __PACKAGE__->add_columns( > '+pickup_location' => { is_boolean => 1 } >diff --git a/Koha/Schema/Result/ProblemReport.pm b/Koha/Schema/Result/ProblemReport.pm >new file mode 100644 >index 0000000000..a55ad1ece6 >--- /dev/null >+++ b/Koha/Schema/Result/ProblemReport.pm >@@ -0,0 +1,189 @@ >+use utf8; >+package Koha::Schema::Result::ProblemReport; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::ProblemReport >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<problem_reports> >+ >+=cut >+ >+__PACKAGE__->table("problem_reports"); >+ >+=head1 ACCESSORS >+ >+=head2 reportid >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 title >+ >+ data_type: 'varchar' >+ default_value: (empty string) >+ is_nullable: 0 >+ size: 40 >+ >+=head2 content >+ >+ data_type: 'varchar' >+ default_value: (empty string) >+ is_nullable: 0 >+ size: 255 >+ >+=head2 borrowernumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+=head2 branchcode >+ >+ data_type: 'varchar' >+ default_value: (empty string) >+ is_foreign_key: 1 >+ is_nullable: 0 >+ size: 10 >+ >+=head2 username >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 75 >+ >+=head2 problempage >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+=head2 recipient >+ >+ data_type: 'enum' >+ default_value: 'library' >+ extra: {list => ["admin","library"]} >+ is_nullable: 0 >+ >+=head2 created_on >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ default_value: current_timestamp >+ is_nullable: 0 >+ >+=head2 status >+ >+ data_type: 'varchar' >+ default_value: 'N' >+ is_nullable: 0 >+ size: 1 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "reportid", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "title", >+ { data_type => "varchar", default_value => "", is_nullable => 0, size => 40 }, >+ "content", >+ { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, >+ "borrowernumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "branchcode", >+ { >+ data_type => "varchar", >+ default_value => "", >+ is_foreign_key => 1, >+ is_nullable => 0, >+ size => 10, >+ }, >+ "username", >+ { data_type => "varchar", is_nullable => 1, size => 75 }, >+ "problempage", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "recipient", >+ { >+ data_type => "enum", >+ default_value => "library", >+ extra => { list => ["admin", "library"] }, >+ is_nullable => 0, >+ }, >+ "created_on", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ default_value => \"current_timestamp", >+ is_nullable => 0, >+ }, >+ "status", >+ { data_type => "varchar", default_value => "N", is_nullable => 0, size => 1 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</reportid> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("reportid"); >+ >+=head1 RELATIONS >+ >+=head2 borrowernumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Borrower> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "borrowernumber", >+ "Koha::Schema::Result::Borrower", >+ { borrowernumber => "borrowernumber" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ >+=head2 branchcode >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "branchcode", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "branchcode" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-11 08:28:15 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qVNVIuurFD6Q6p4YA5Kptg >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4461
:
58887
|
59032
|
61654
|
65871
|
66253
|
66323
|
66324
|
98687
|
98688
|
98689
|
98725
|
99551
|
99599
|
99600
|
99601
|
99602
|
99603
|
99633
|
99635
|
99636
|
99637
|
99638
|
99639
|
99929
|
99930
|
99931
|
99932
|
99933
|
99934
|
99935
|
99936
|
99937
|
99938
|
99939
|
99940
|
99941
|
99942
|
100488
|
100489
|
100490
|
100491
|
100492
|
100493
|
100494
|
100495
|
100496
|
100497
|
100498
|
100499
|
100500
|
100506
|
100507
|
100508
|
100509
|
100510
|
100511
|
100512
|
100513
|
100514
|
100515
|
100516
|
100517
|
100518
|
100519
|
100520
|
100521
|
100522
|
100523
|
100524
|
100619
|
100989
|
100990
|
102188
|
102189
|
102190
|
102191
|
102192
|
102193
|
102194
|
102195
|
102196
|
102198
|
102200
|
102201
|
102202
|
102203
|
102204
|
102205
|
102206
|
102207
|
102208
|
102209
|
102210
|
102211
|
102253
|
102279
|
102281
|
102308
|
102309
|
102310
|
102311
|
102312
|
102313
|
102314
|
102315
|
102316
|
102317
|
102318
|
102319
|
102320
|
102321
|
102322
|
102323
|
102324
|
102325
|
102326
|
102327
|
102328
|
102329
|
102330
|
102331
|
102358
|
102359
|
102360
|
102361
|
102362
|
102363
|
102364
|
102365
|
102366
|
102367
|
102368
|
102369
|
102370
|
102371
|
102372
|
102373
|
102374
|
102375
|
102376
|
102377
|
102378
|
102379
|
102380
|
102381
|
102382
|
102383
|
102384
|
102385
|
102386