Bugzilla – Attachment 60654 Details for
Bug 16034
Integration with OverDrive Patron API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16034: (followup) Fix DB update and schema files
Bug-16034-followup-Fix-DB-update-and-schema-files.patch (text/plain), 4.94 KB, created by
Tomás Cohen Arazi
on 2017-02-24 12:23:31 UTC
(
hide
)
Description:
Bug 16034: (followup) Fix DB update and schema files
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2017-02-24 12:23:31 UTC
Size:
4.94 KB
patch
obsolete
>From 83768738898d13d155f30f28b6c312fba2cbfbb2 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 24 Feb 2017 09:22:26 -0300 >Subject: [PATCH] Bug 16034: (followup) Fix DB update and schema files > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Schema/Result/Borrower.pm | 9 +++++++-- > Koha/Schema/Result/Deletedborrower.pm | 11 +++++++++-- > installer/data/mysql/kohastructure.sql | 3 ++- > installer/data/mysql/updatedatabase.pl | 4 ++++ > 4 files changed, 22 insertions(+), 5 deletions(-) > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 4241dd0bfa..547028f592 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -427,6 +427,11 @@ __PACKAGE__->table("borrowers"); > datetime_undef_if_invalid: 1 > is_nullable: 1 > >+=head2 overdrive_auth_token >+ >+ data_type: 'text' >+ is_nullable: 1 >+ > =cut > > __PACKAGE__->add_columns( >@@ -1336,8 +1341,8 @@ Composing rels: L</aqorder_users> -> ordernumber > __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-31 10:39:35 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lc6GQ2E7d+tyzTk3v2sWjQ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-02-10 07:30:06 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:35WEsGd5LmkZ3bB486M1yA > > __PACKAGE__->belongs_to( > "guarantor", >diff --git a/Koha/Schema/Result/Deletedborrower.pm b/Koha/Schema/Result/Deletedborrower.pm >index 937a4a4e9a..778705e997 100644 >--- a/Koha/Schema/Result/Deletedborrower.pm >+++ b/Koha/Schema/Result/Deletedborrower.pm >@@ -424,6 +424,11 @@ __PACKAGE__->table("deletedborrowers"); > datetime_undef_if_invalid: 1 > is_nullable: 1 > >+=head2 overdrive_auth_token >+ >+ data_type: 'text' >+ is_nullable: 1 >+ > =cut > > __PACKAGE__->add_columns( >@@ -601,11 +606,13 @@ __PACKAGE__->add_columns( > datetime_undef_if_invalid => 1, > is_nullable => 1, > }, >+ "overdrive_auth_token", >+ { data_type => "text", is_nullable => 1 }, > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-09-13 17:32:29 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pcdyzQacTbFDJ9R1k0E8mA >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-02-10 07:30:06 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tq4JDUSFKuU5K69TTVSkVg > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 117c14f9ba..985ee27626 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -630,6 +630,7 @@ CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower > `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'. > `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others) > `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface) >+ `overdrive_auth_token` text default NULL, -- persist OverDrive auth token > KEY borrowernumber (borrowernumber), > KEY `cardnumber` (`cardnumber`), > KEY `sms_provider_id` (`sms_provider_id`) >@@ -1655,7 +1656,7 @@ CREATE TABLE `borrowers` ( -- this table includes information about your patrons > `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'. > `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others) > `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface) >- overdrive_auth_token text default NULL, -- persist OverDrive auth token >+ `overdrive_auth_token` text default NULL, -- persist OverDrive auth token > UNIQUE KEY `cardnumber` (`cardnumber`), > PRIMARY KEY `borrowernumber` (`borrowernumber`), > KEY `categorycode` (`categorycode`), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 2d94ecd862..336797270f 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -13914,6 +13914,10 @@ if( CheckVersion( $DBversion ) ) { > }); > > $dbh->do(q{ >+ ALTER TABLE deletedborrowers ADD overdrive_auth_token text default NULL AFTER lastseen; >+ }); >+ >+ $dbh->do(q{ > INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) > VALUES ('OverDriveCirculation','0','Enable client to see their OverDrive account','','YesNo'); > }); >-- >2.11.1
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 16034
:
48919
|
48920
|
48921
|
49929
|
49930
|
49931
|
53793
|
55594
|
55675
|
55676
|
55677
|
55678
|
55763
|
55764
|
55765
|
55766
|
55815
|
55816
|
57398
|
57399
|
57400
|
57401
|
58518
|
58519
|
58520
|
58521
|
58522
|
58790
|
58791
|
59055
|
59056
|
59057
|
59058
|
59392
|
59393
|
59394
|
59395
|
59713
|
59714
|
59743
|
59744
|
59745
|
59746
|
60626
| 60654 |
60789