Bugzilla – Attachment 78781 Details for
Bug 20819
GDPR: Add a consent field for processing personal data in account menu and self-registration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20819: DBIx schema changes
Bug-20819-DBIx-schema-changes.patch (text/plain), 4.82 KB, created by
Biblibre Sandboxes
on 2018-09-14 22:24:57 UTC
(
hide
)
Description:
Bug 20819: DBIx schema changes
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2018-09-14 22:24:57 UTC
Size:
4.82 KB
patch
obsolete
>From 6fca80453c71d3a98ed0e739a23d2910e2e8f1c4 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 4 Jun 2018 14:18:15 +0200 >Subject: [PATCH] Bug 20819: DBIx schema changes >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >No test plan. > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> >--- > Koha/Schema/Result/Borrower.pm | 15 ++++ > Koha/Schema/Result/BorrowerModification.pm | 16 +++- > Koha/Schema/Result/PatronConsent.pm | 118 +++++++++++++++++++++++++++++ > 3 files changed, 147 insertions(+), 2 deletions(-) > create mode 100644 Koha/Schema/Result/PatronConsent.pm > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index ab0fefc..3b08198 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -1145,6 +1145,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 patron_consents >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::PatronConsent> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "patron_consents", >+ "Koha::Schema::Result::PatronConsent", >+ { "foreign.borrowernumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 patron_list_patrons > > Type: has_many >diff --git a/Koha/Schema/Result/BorrowerModification.pm b/Koha/Schema/Result/BorrowerModification.pm >index 013da77..8e3cecb 100644 >--- a/Koha/Schema/Result/BorrowerModification.pm >+++ b/Koha/Schema/Result/BorrowerModification.pm >@@ -415,6 +415,12 @@ __PACKAGE__->table("borrower_modifications"); > data_type: 'mediumtext' > is_nullable: 1 > >+=head2 gdpr_proc_consent >+ >+ data_type: 'datetime' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ > =cut > > __PACKAGE__->add_columns( >@@ -581,6 +587,12 @@ __PACKAGE__->add_columns( > { data_type => "integer", is_nullable => 1 }, > "extended_attributes", > { data_type => "mediumtext", is_nullable => 1 }, >+ "gdpr_proc_consent", >+ { >+ data_type => "datetime", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 1, >+ }, > ); > > =head1 PRIMARY KEY >@@ -598,8 +610,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("verification_token", "borrowernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Vv0bJqR71Ust1MZAkYqTig >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-06-04 14:17:47 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NE/d8+g2NbRoj/VCd2ecyg > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/PatronConsent.pm b/Koha/Schema/Result/PatronConsent.pm >new file mode 100644 >index 0000000..fc4c8c1 >--- /dev/null >+++ b/Koha/Schema/Result/PatronConsent.pm >@@ -0,0 +1,118 @@ >+use utf8; >+package Koha::Schema::Result::PatronConsent; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::PatronConsent >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<patron_consent> >+ >+=cut >+ >+__PACKAGE__->table("patron_consent"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 borrowernumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+=head2 type >+ >+ data_type: 'enum' >+ extra: {list => ["GDPR_PROCESSING"]} >+ is_nullable: 1 >+ >+=head2 given_on >+ >+ data_type: 'datetime' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ >+=head2 refused_on >+ >+ data_type: 'datetime' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "borrowernumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "type", >+ { >+ data_type => "enum", >+ extra => { list => ["GDPR_PROCESSING"] }, >+ is_nullable => 1, >+ }, >+ "given_on", >+ { >+ data_type => "datetime", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 1, >+ }, >+ "refused_on", >+ { >+ data_type => "datetime", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 1, >+ }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=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, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-06-04 14:17:47 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rCOHwL/2vlzKAUM517J+HA >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.7.4
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 20819
:
75765
|
75766
|
75767
|
75818
|
75819
|
75820
|
76781
|
76782
|
76783
|
76784
|
76785
|
77264
|
77265
|
77266
|
77267
|
77268
|
77269
|
78369
|
78370
|
78371
|
78372
|
78373
|
78374
|
78779
|
78781
|
78783
|
78784
|
78786
|
78788
|
79059
|
79062
|
79063
|
79064
|
79065
|
79066
|
79067
|
79129
|
79130
|
79131
|
79132
|
79133
|
79134
|
79135
|
79175
|
79190