Bug 15517: Update DB rev (3.20.08.004)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit e06c67044e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
Brendan Gallagher 2016-02-23 23:13:08 +00:00 committed by Frédéric Demians
parent 7dd1ba3053
commit 3ca00cdaac
4 changed files with 17 additions and 7 deletions

View File

@ -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.20.08.003";
$VERSION = "3.20.08.004";
sub version {
return $VERSION;

View File

@ -305,7 +305,7 @@ __PACKAGE__->table("deletedborrowers");
data_type: 'varchar'
is_nullable: 1
size: 30
size: 60
=head2 flags
@ -316,7 +316,7 @@ __PACKAGE__->table("deletedborrowers");
data_type: 'varchar'
is_nullable: 1
size: 30
size: 75
=head2 opacnote
@ -527,11 +527,11 @@ __PACKAGE__->add_columns(
"sex",
{ data_type => "varchar", is_nullable => 1, size => 1 },
"password",
{ data_type => "varchar", is_nullable => 1, size => 30 },
{ data_type => "varchar", is_nullable => 1, size => 60 },
"flags",
{ data_type => "integer", is_nullable => 1 },
"userid",
{ data_type => "varchar", is_nullable => 1, size => 30 },
{ data_type => "varchar", is_nullable => 1, size => 75 },
"opacnote",
{ data_type => "mediumtext", is_nullable => 1 },
"contactnote",

View File

@ -1,2 +0,0 @@
ALTER TABLE deletedborrowers MODIFY COLUMN userid VARCHAR(75) DEFAULT NULL;
ALTER TABLE deletedborrowers MODIFY COLUMN password VARCHAR(60) DEFAULT NULL;

View File

@ -10746,6 +10746,18 @@ if ( CheckVersion($DBversion) ) {
SetVersion($DBversion);
}
$DBversion = "3.20.08.004";
if ( CheckVersion($DBversion) ) {
$dbh->do(q{
ALTER TABLE deletedborrowers MODIFY COLUMN userid VARCHAR(75) DEFAULT NULL;
});
$dbh->do(q{
ALTER TABLE deletedborrowers MODIFY COLUMN password VARCHAR(60) DEFAULT NULL;
});
print "Upgrade to $DBversion done (Bug 15517 - Tables borrowers and deletedborrowers differ again)\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.