Bug 21336: DBRev 18.12.00.051
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
d86f17e6b8
commit
6f9341a7f7
7 changed files with 61 additions and 30 deletions
2
Koha.pm
2
Koha.pm
|
@ -29,7 +29,7 @@ use vars qw{ $VERSION };
|
||||||
# - #4 : the developer version. The 4th number is the database subversion.
|
# - #4 : the developer version. The 4th number is the database subversion.
|
||||||
# used by developers when the database changes. updatedatabase take care of the changes itself
|
# used by developers when the database changes. updatedatabase take care of the changes itself
|
||||||
# and is automatically called by Auth.pm when needed.
|
# and is automatically called by Auth.pm when needed.
|
||||||
$VERSION = "18.12.00.048";
|
$VERSION = "18.12.00.051";
|
||||||
|
|
||||||
sub version {
|
sub version {
|
||||||
return $VERSION;
|
return $VERSION;
|
||||||
|
|
|
@ -451,6 +451,13 @@ __PACKAGE__->table("borrowers");
|
||||||
data_type: 'mediumtext'
|
data_type: 'mediumtext'
|
||||||
is_nullable: 1
|
is_nullable: 1
|
||||||
|
|
||||||
|
=head2 flgAnonymized
|
||||||
|
|
||||||
|
accessor: 'flg_anonymized'
|
||||||
|
data_type: 'tinyint'
|
||||||
|
default_value: 0
|
||||||
|
is_nullable: 1
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
__PACKAGE__->add_columns(
|
__PACKAGE__->add_columns(
|
||||||
|
@ -653,6 +660,13 @@ __PACKAGE__->add_columns(
|
||||||
{ data_type => "integer", default_value => 0, is_nullable => 1 },
|
{ data_type => "integer", default_value => 0, is_nullable => 1 },
|
||||||
"overdrive_auth_token",
|
"overdrive_auth_token",
|
||||||
{ data_type => "mediumtext", is_nullable => 1 },
|
{ data_type => "mediumtext", is_nullable => 1 },
|
||||||
|
"flgAnonymized",
|
||||||
|
{
|
||||||
|
accessor => "flg_anonymized",
|
||||||
|
data_type => "tinyint",
|
||||||
|
default_value => 0,
|
||||||
|
is_nullable => 1,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
=head1 PRIMARY KEY
|
=head1 PRIMARY KEY
|
||||||
|
@ -1521,8 +1535,8 @@ Composing rels: L</aqorder_users> -> ordernumber
|
||||||
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
|
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
|
||||||
|
|
||||||
|
|
||||||
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2019-03-22 20:06:37
|
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-04-17 11:11:33
|
||||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dbRPH4TDrnUkzbJdgM5XcQ
|
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZkPU/EUsZVXiRoQ1E8NMbw
|
||||||
|
|
||||||
__PACKAGE__->belongs_to(
|
__PACKAGE__->belongs_to(
|
||||||
"guarantor",
|
"guarantor",
|
||||||
|
|
|
@ -448,6 +448,13 @@ __PACKAGE__->table("deletedborrowers");
|
||||||
data_type: 'mediumtext'
|
data_type: 'mediumtext'
|
||||||
is_nullable: 1
|
is_nullable: 1
|
||||||
|
|
||||||
|
=head2 flgAnonymized
|
||||||
|
|
||||||
|
accessor: 'flg_anonymized'
|
||||||
|
data_type: 'tinyint'
|
||||||
|
default_value: 0
|
||||||
|
is_nullable: 1
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
__PACKAGE__->add_columns(
|
__PACKAGE__->add_columns(
|
||||||
|
@ -638,11 +645,18 @@ __PACKAGE__->add_columns(
|
||||||
{ data_type => "integer", default_value => 0, is_nullable => 1 },
|
{ data_type => "integer", default_value => 0, is_nullable => 1 },
|
||||||
"overdrive_auth_token",
|
"overdrive_auth_token",
|
||||||
{ data_type => "mediumtext", is_nullable => 1 },
|
{ data_type => "mediumtext", is_nullable => 1 },
|
||||||
|
"flgAnonymized",
|
||||||
|
{
|
||||||
|
accessor => "flg_anonymized",
|
||||||
|
data_type => "tinyint",
|
||||||
|
default_value => 0,
|
||||||
|
is_nullable => 1,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
|
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-04-17 11:11:33
|
||||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DNkNHNcv0lkMH6/seu89hg
|
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9XbNY+E7YqzsiUldTFg6Zg
|
||||||
|
|
||||||
|
|
||||||
# You can replace this text with custom code or comments, and it will be preserved on regeneration
|
# You can replace this text with custom code or comments, and it will be preserved on regeneration
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
$DBversion = 'XXX'; # will be replaced by the RM
|
|
||||||
if( CheckVersion( $DBversion ) ) {
|
|
||||||
$dbh->do( "ALTER TABLE borrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" ) if !column_exists('borrowers', 'flgAnonymized');
|
|
||||||
$dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" ) if !column_exists('deletedborrowers', 'flgAnonymized');
|
|
||||||
SetVersion( $DBversion );
|
|
||||||
print "Upgrade to $DBversion done (Bug 21336 - Add field flgAnonymized)\n";
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
$DBversion = 'XXX'; # will be replaced by the RM
|
|
||||||
if( CheckVersion( $DBversion ) ) {
|
|
||||||
$dbh->do( q|
|
|
||||||
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
|
|
||||||
VALUES
|
|
||||||
('UnsubscribeReflectionDelay','',NULL,'Delay for locking unsubscribers', 'Integer'),
|
|
||||||
('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'),
|
|
||||||
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer')
|
|
||||||
|);
|
|
||||||
SetVersion( $DBversion );
|
|
||||||
print "Upgrade to $DBversion done (Bug 21336 - Add preferences)\n";
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
$DBversion = 'XXX'; # will be replaced by the RM
|
|
||||||
if( CheckVersion( $DBversion ) ) {
|
|
||||||
$dbh->do( "UPDATE borrowers SET login_attempts = ? WHERE login_attempts > ?", undef, C4::Context->preference('FailedLoginAttempts'), C4::Context->preference('FailedLoginAttempts') );
|
|
||||||
SetVersion( $DBversion );
|
|
||||||
print "Upgrade to $DBversion done (Bug 21336 - Reset login_attempts)\n";
|
|
||||||
}
|
|
|
@ -18035,6 +18035,34 @@ if( CheckVersion( $DBversion ) ) {
|
||||||
print "Upgrade to $DBversion done (Bug 22044 - Set a default value for NoRenewalBeforePrecision)\n";
|
print "Upgrade to $DBversion done (Bug 22044 - Set a default value for NoRenewalBeforePrecision)\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$DBversion = '18.12.00.049';
|
||||||
|
if( CheckVersion( $DBversion ) ) {
|
||||||
|
$dbh->do( "ALTER TABLE borrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" ) if !column_exists('borrowers', 'flgAnonymized');
|
||||||
|
$dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" ) if !column_exists('deletedborrowers', 'flgAnonymized');
|
||||||
|
SetVersion( $DBversion );
|
||||||
|
print "Upgrade to $DBversion done (Bug 21336 - Add field flgAnonymized)\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$DBversion = '18.12.00.050';
|
||||||
|
if( CheckVersion( $DBversion ) ) {
|
||||||
|
$dbh->do( q|
|
||||||
|
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
|
||||||
|
VALUES
|
||||||
|
('UnsubscribeReflectionDelay','',NULL,'Delay for locking unsubscribers', 'Integer'),
|
||||||
|
('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'),
|
||||||
|
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer')
|
||||||
|
|);
|
||||||
|
SetVersion( $DBversion );
|
||||||
|
print "Upgrade to $DBversion done (Bug 21336 - Add preferences)\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$DBversion = '18.12.00.051';
|
||||||
|
if( CheckVersion( $DBversion ) ) {
|
||||||
|
$dbh->do( "UPDATE borrowers SET login_attempts = ? WHERE login_attempts > ?", undef, C4::Context->preference('FailedLoginAttempts'), C4::Context->preference('FailedLoginAttempts') );
|
||||||
|
SetVersion( $DBversion );
|
||||||
|
print "Upgrade to $DBversion done (Bug 21336 - Reset login_attempts)\n";
|
||||||
|
}
|
||||||
|
|
||||||
# SEE bug 13068
|
# SEE bug 13068
|
||||||
# if there is anything in the atomicupdate, read and execute it.
|
# if there is anything in the atomicupdate, read and execute it.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue