Bug 20472: Make DB rev idempotent
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
f77fd6c993
commit
2de4f55ea5
1 changed files with 12 additions and 5 deletions
|
@ -1,9 +1,16 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
$dbh->do(q|
|
||||
ALTER TABLE article_requests
|
||||
ADD COLUMN `format` enum('PHOTOCOPY', 'SCAN') NOT NULL DEFAULT 'PHOTOCOPY' AFTER notes,
|
||||
ADD COLUMN `urls` MEDIUMTEXT AFTER format
|
||||
|);
|
||||
unless ( column_exists('article_requests', 'format') ) {
|
||||
$dbh->do(q|
|
||||
ALTER TABLE article_requests
|
||||
ADD COLUMN `format` enum('PHOTOCOPY', 'SCAN') NOT NULL DEFAULT 'PHOTOCOPY' AFTER notes
|
||||
|);
|
||||
}
|
||||
unless ( column_exists('article_requests', 'urls') ) {
|
||||
$dbh->do(q|
|
||||
ALTER TABLE article_requests
|
||||
ADD COLUMN `urls` MEDIUMTEXT AFTER format
|
||||
|);
|
||||
}
|
||||
NewVersion( $DBversion, 20472, "Add columns format and urls in article_requests table");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue