Bug 16034: (followup) Fix DB update and schema files
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 24 Feb 2017 12:22:26 +0000 (09:22 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Sun, 26 Feb 2017 16:39:17 +0000 (16:39 +0000)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Schema/Result/Borrower.pm
Koha/Schema/Result/Deletedborrower.pm
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl

index b389595..b4b6313 100644 (file)
@@ -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(
@@ -1351,8 +1356,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",
index 937a4a4..778705e 100644 (file)
@@ -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
index f2c344a..34bed1f 100644 (file)
@@ -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`),
index 2d94ecd..3367972 100755 (executable)
@@ -13913,6 +13913,10 @@ if( CheckVersion( $DBversion ) ) {
         ALTER TABLE borrowers ADD overdrive_auth_token text default NULL AFTER lastseen;
     });
 
+    $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');