Bugzilla – Attachment 109603 Details for
Bug 22343
Add configuration options for SMTP servers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22343: Add new tables schema file
Bug-22343-Add-new-tables-schema-file.patch (text/plain), 5.76 KB, created by
Kyle M Hall (khall)
on 2020-09-03 10:21:51 UTC
(
hide
)
Description:
Bug 22343: Add new tables schema file
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-09-03 10:21:51 UTC
Size:
5.76 KB
patch
obsolete
>From d4ce207150bd3418e74acf366f2e49272417d149 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 28 Jul 2020 09:52:32 -0300 >Subject: [PATCH] Bug 22343: Add new tables schema file > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Schema/Result/LibrarySmtpServer.pm | 120 ++++++++++++++++++ > Koha/Schema/Result/SmtpServer.pm | 158 ++++++++++++++++++++++++ > 2 files changed, 278 insertions(+) > create mode 100644 Koha/Schema/Result/LibrarySmtpServer.pm > create mode 100644 Koha/Schema/Result/SmtpServer.pm > >diff --git a/Koha/Schema/Result/LibrarySmtpServer.pm b/Koha/Schema/Result/LibrarySmtpServer.pm >new file mode 100644 >index 0000000000..eaf34fe7d9 >--- /dev/null >+++ b/Koha/Schema/Result/LibrarySmtpServer.pm >@@ -0,0 +1,120 @@ >+use utf8; >+package Koha::Schema::Result::LibrarySmtpServer; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::LibrarySmtpServer >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<library_smtp_servers> >+ >+=cut >+ >+__PACKAGE__->table("library_smtp_servers"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 library_id >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ size: 10 >+ >+=head2 smtp_server_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "library_id", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, >+ "smtp_server_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<library_id_idx> >+ >+=over 4 >+ >+=item * L</library_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("library_id_idx", ["library_id"]); >+ >+=head1 RELATIONS >+ >+=head2 library >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "library", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "library_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+=head2 smtp_server >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::SmtpServer> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "smtp_server", >+ "Koha::Schema::Result::SmtpServer", >+ { id => "smtp_server_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-08-24 13:41:24 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qKAQAs3VFcitIGDGra/zuw >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/SmtpServer.pm b/Koha/Schema/Result/SmtpServer.pm >new file mode 100644 >index 0000000000..6761c21bb4 >--- /dev/null >+++ b/Koha/Schema/Result/SmtpServer.pm >@@ -0,0 +1,158 @@ >+use utf8; >+package Koha::Schema::Result::SmtpServer; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::SmtpServer >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<smtp_servers> >+ >+=cut >+ >+__PACKAGE__->table("smtp_servers"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 name >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 80 >+ >+=head2 host >+ >+ data_type: 'varchar' >+ default_value: 'localhost' >+ is_nullable: 0 >+ size: 80 >+ >+=head2 port >+ >+ data_type: 'integer' >+ default_value: 25 >+ is_nullable: 0 >+ >+=head2 timeout >+ >+ data_type: 'integer' >+ default_value: 120 >+ is_nullable: 0 >+ >+=head2 ssl_mode >+ >+ data_type: 'enum' >+ extra: {list => ["disabled","ssl","starttls"]} >+ is_nullable: 0 >+ >+=head2 user_name >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 80 >+ >+=head2 password >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 80 >+ >+=head2 debug >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "name", >+ { data_type => "varchar", is_nullable => 0, size => 80 }, >+ "host", >+ { >+ data_type => "varchar", >+ default_value => "localhost", >+ is_nullable => 0, >+ size => 80, >+ }, >+ "port", >+ { data_type => "integer", default_value => 25, is_nullable => 0 }, >+ "timeout", >+ { data_type => "integer", default_value => 120, is_nullable => 0 }, >+ "ssl_mode", >+ { >+ data_type => "enum", >+ extra => { list => ["disabled", "ssl", "starttls"] }, >+ is_nullable => 0, >+ }, >+ "user_name", >+ { data_type => "varchar", is_nullable => 1, size => 80 }, >+ "password", >+ { data_type => "varchar", is_nullable => 1, size => 80 }, >+ "debug", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 RELATIONS >+ >+=head2 library_smtp_servers >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::LibrarySmtpServer> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "library_smtp_servers", >+ "Koha::Schema::Result::LibrarySmtpServer", >+ { "foreign.smtp_server_id" => "self.id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-08-21 18:02:08 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OpyR6JhcwWKQP2+hyaLiww >+ >+__PACKAGE__->add_columns( >+ '+debug' => { is_boolean => 1 } >+); >+ >+sub koha_objects_class { >+ 'Koha::SMTP::Servers'; >+} >+ >+sub koha_object_class { >+ 'Koha::SMTP::Server'; >+} >+ >+1; >-- >2.24.1 (Apple Git-126)
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 22343
:
107598
|
107599
|
107600
|
107601
|
107602
|
107603
|
107604
|
107605
|
107987
|
107988
|
107989
|
107990
|
107991
|
107992
|
107993
|
107994
|
107995
|
107996
|
107997
|
107998
|
107999
|
108009
|
108107
|
108108
|
108109
|
108110
|
108111
|
108112
|
108113
|
108114
|
108115
|
108116
|
108117
|
108118
|
108119
|
108131
|
108132
|
108133
|
108134
|
108135
|
108136
|
108137
|
108138
|
108139
|
108140
|
108141
|
108142
|
108143
|
108529
|
108537
|
108538
|
108539
|
108540
|
108541
|
108542
|
108543
|
108544
|
108545
|
108546
|
108547
|
108548
|
108549
|
108609
|
108638
|
108642
|
108643
|
108644
|
108645
|
108646
|
108647
|
108648
|
108649
|
108650
|
108651
|
108652
|
108653
|
108654
|
108655
|
108656
|
108715
|
108716
|
109003
|
109004
|
109005
|
109006
|
109007
|
109008
|
109009
|
109010
|
109011
|
109012
|
109013
|
109014
|
109015
|
109016
|
109017
|
109018
|
109155
|
109156
|
109157
|
109158
|
109159
|
109160
|
109161
|
109162
|
109163
|
109164
|
109165
|
109166
|
109167
|
109168
|
109169
|
109170
|
109601
|
109602
|
109603
|
109604
|
109605
|
109606
|
109607
|
109608
|
109609
|
109610
|
109611
|
109612
|
109613
|
109614
|
109615
|
109616
|
109723
|
109724
|
109725
|
109726
|
109727
|
109728
|
109729
|
109730
|
109731
|
109732
|
109733
|
109734
|
109735
|
109736
|
109737
|
109738
|
109739
|
109740
|
109787
|
109788
|
111048
|
111087
|
111088
|
111089
|
111090
|
111154
|
111165
|
111166
|
111175
|
111176
|
111213
|
111215
|
111216
|
111442
|
111482
|
113240
|
113827
|
113847