DBREV Bug 12267 - Allow password option in Patron Attribute non functional
This commit is contained in:
parent
313e4c0282
commit
9e350eee19
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.
|
||||
# used by developers when the database changes. updatedatabase take care of the changes itself
|
||||
# and is automatically called by Auth.pm when needed.
|
||||
$VERSION = "3.23.00.048";
|
||||
$VERSION = "3.23.00.049";
|
||||
|
||||
sub version {
|
||||
return $VERSION;
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
my $dbh = C4::Context->dbh;
|
||||
my ( $column_has_been_used ) = $dbh->selectrow_array(q|
|
||||
SELECT COUNT(*)
|
||||
FROM borrower_attributes
|
||||
WHERE password IS NOT NULL
|
||||
|);
|
||||
|
||||
if ( $column_has_been_used ) {
|
||||
print q|WARNING: The columns borrower_attribute_types.password_allowed and borrower_attributes.password have been removed from the Koha codebase. They were not used. However your installation has at least one borrower_attributes.password defined. In order not to alter your data, the columns have been kept, please save the information elsewhere and remove these columns manually.|;
|
||||
} else {
|
||||
$dbh->do(q|
|
||||
ALTER TABLE borrower_attribute_types DROP column password_allowed
|
||||
|);
|
||||
$dbh->do(q|
|
||||
ALTER TABLE borrower_attributes DROP column password;
|
||||
|);
|
||||
}
|
||||
|
|
@ -12231,6 +12231,31 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
DBversion = "3.23.00.049";
|
||||
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
|
||||
my $dbh = C4::Context->dbh;
|
||||
my ( $column_has_been_used ) = $dbh->selectrow_array(q|
|
||||
SELECT COUNT(*)
|
||||
FROM borrower_attributes
|
||||
WHERE password IS NOT NULL
|
||||
|);
|
||||
|
||||
if ( $column_has_been_used ) {
|
||||
print q|WARNING: The columns borrower_attribute_types.password_allowed and borrower_attributes.password have been removed from the Koha codebase. They were not used. However your installation has at least one borrower_attributes.password defined. In order not to alter your data, the columns have been kept, please save the information elsewhere and remove these columns manually.|;
|
||||
} else {
|
||||
$dbh->do(q|
|
||||
ALTER TABLE borrower_attribute_types DROP column password_allowed
|
||||
|);
|
||||
$dbh->do(q|
|
||||
ALTER TABLE borrower_attributes DROP column password;
|
||||
|);
|
||||
}
|
||||
print "Upgrade to $DBversion done (Bug 12267 - Allow password option in Patron Attribute non functional)\n";
|
||||
SetVersion($DBversion);
|
||||
}
|
||||
|
||||
|
||||
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
|
||||
# SEE bug 13068
|
||||
# if there is anything in the atomicupdate, read and execute it.
|
||||
|
|
|
|||
Loading…
Reference in New Issue