Bug 29605: DBRev 21.12.00.013
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
440f31c268
commit
6935a30cfc
2 changed files with 34 additions and 39 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.
|
||||
# used by developers when the database changes. updatedatabase take care of the changes itself
|
||||
# and is automatically called by Auth.pm when needed.
|
||||
$VERSION = "21.12.00.012";
|
||||
$VERSION = "21.12.00.013";
|
||||
|
||||
sub version {
|
||||
return $VERSION;
|
||||
|
|
|
@ -12,7 +12,7 @@ return {
|
|||
|
||||
$dbh->do(q{
|
||||
ALTER TABLE language_script_mapping
|
||||
DROP KEY `language_subtag`;
|
||||
DROP KEY `language_subtag`;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ return {
|
|||
|
||||
$dbh->do(q{
|
||||
ALTER TABLE language_script_mapping
|
||||
ADD PRIMARY KEY `language_subtag` (`language_subtag`);
|
||||
ADD PRIMARY KEY `language_subtag` (`language_subtag`);
|
||||
});
|
||||
|
||||
say $out "Added missing primary key on language_script_mapping"
|
||||
|
@ -29,61 +29,56 @@ return {
|
|||
unless ( foreign_key_exists('tmp_holdsqueue', 'tmp_holdsqueue_ibfk_3') ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE tmp_holdsqueue
|
||||
ADD CONSTRAINT `tmp_holdsqueue_ibfk_3` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
ADD CONSTRAINT `tmp_holdsqueue_ibfk_3` FOREIGN KEY (`borrowernumber`)
|
||||
REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
});
|
||||
|
||||
say $out "Added missing foreign key on tmp_holdsqueue";
|
||||
}
|
||||
|
||||
$dbh->do(
|
||||
q{
|
||||
$dbh->do(q{
|
||||
ALTER TABLE `account_offsets`
|
||||
MODIFY COLUMN `type` enum( 'CREATE', 'APPLY', 'VOID', 'OVERDUE_INCREASE', 'OVERDUE_DECREASE' ) NOT NULL
|
||||
}
|
||||
);
|
||||
});
|
||||
say $out "Ensure NOT NULL on account_offsets.type";
|
||||
|
||||
$dbh->do(
|
||||
q{
|
||||
$dbh->do(q{
|
||||
ALTER TABLE `additional_contents`
|
||||
MODIFY COLUMN `code` VARCHAR(100) NOT NULL
|
||||
}
|
||||
);
|
||||
});
|
||||
say $out "Ensure additional_contents.code is VARCHAR(100)";
|
||||
|
||||
$dbh->do(
|
||||
q{
|
||||
$dbh->do(q{
|
||||
ALTER TABLE `additional_contents`
|
||||
MODIFY COLUMN `lang` VARCHAR(50) NOT NULL DEFAULT ''
|
||||
}
|
||||
);
|
||||
});
|
||||
say $out "Ensure additional_contents.lang is VARCHAR(50)";
|
||||
|
||||
$dbh->do(q{ALTER TABLE search_marc_map MODIFY `marc_type` enum('marc21','unimarc') NOT NULL COMMENT 'what MARC type this map is for'});
|
||||
$dbh->do(q{
|
||||
ALTER TABLE search_marc_map MODIFY `marc_type` enum('marc21','unimarc') NOT NULL COMMENT 'what MARC type this map is for'
|
||||
});
|
||||
say $out "Ensure NOT NULL on search_marc_map.marc_type";
|
||||
|
||||
$dbh->do(
|
||||
q{
|
||||
alter table
|
||||
`branchtransfers`
|
||||
modify column
|
||||
`cancellation_reason` enum(
|
||||
'Manual',
|
||||
'StockrotationAdvance',
|
||||
'StockrotationRepatriation',
|
||||
'ReturnToHome',
|
||||
'ReturnToHolding',
|
||||
'RotatingCollection',
|
||||
'Reserve',
|
||||
'LostReserve',
|
||||
'CancelReserve',
|
||||
'ItemLost',
|
||||
'WrongTransfer'
|
||||
) DEFAULT NULL
|
||||
after `reason`
|
||||
}
|
||||
);
|
||||
$dbh->do(q{
|
||||
alter table
|
||||
`branchtransfers`
|
||||
modify column
|
||||
`cancellation_reason` enum(
|
||||
'Manual',
|
||||
'StockrotationAdvance',
|
||||
'StockrotationRepatriation',
|
||||
'ReturnToHome',
|
||||
'ReturnToHolding',
|
||||
'RotatingCollection',
|
||||
'Reserve',
|
||||
'LostReserve',
|
||||
'CancelReserve',
|
||||
'ItemLost',
|
||||
'WrongTransfer'
|
||||
) DEFAULT NULL
|
||||
after `reason`
|
||||
});
|
||||
say $out "Ensure branchtransfers.cancellation_reason enum values are uppercase";
|
||||
},
|
||||
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue