Bug 21336: (QA follow-up) Add column_exists in db revision
As requested by Josef on comment70. Test plan: Run db revision twice. No warnings. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
af84af7cb7
commit
5e1894c948
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
$DBversion = 'XXX'; # will be replaced by the RM
|
$DBversion = 'XXX'; # will be replaced by the RM
|
||||||
if( CheckVersion( $DBversion ) ) {
|
if( CheckVersion( $DBversion ) ) {
|
||||||
$dbh->do( "ALTER TABLE borrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" );
|
$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" );
|
$dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" ) if !column_exists('deletedborrowers', 'flgAnonymized');
|
||||||
SetVersion( $DBversion );
|
SetVersion( $DBversion );
|
||||||
print "Upgrade to $DBversion done (Bug 21336 - Add field flgAnonymized)\n";
|
print "Upgrade to $DBversion done (Bug 21336 - Add field flgAnonymized)\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue