|
Line 0
Link Here
|
| 0 |
- |
1 |
$DBversion = 'XXX'; # will be replaced by the RM |
|
|
2 |
if( CheckVersion( $DBversion ) ) { |
| 3 |
if( !column_exists( 'suggestions', 'lastmodificationby' ) ) { |
| 4 |
$dbh->do(q| |
| 5 |
ALTER TABLE suggestions ADD COLUMN lastmodificationby INT(11) DEFAULT NULL AFTER rejecteddate |
| 6 |
|); |
| 7 |
|
| 8 |
$dbh->do(q| |
| 9 |
ALTER TABLE suggestions ADD CONSTRAINT `suggestions_ibfk_lastmodificationby` FOREIGN KEY (`lastmodificationby`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE |
| 10 |
|); |
| 11 |
} |
| 12 |
if( !column_exists( 'suggestions', 'lastmodificationdate' ) ) { |
| 13 |
$dbh->do(q| |
| 14 |
ALTER TABLE suggestions ADD COLUMN lastmodificationdate DATE DEFAULT NULL |
| 15 |
|); |
| 16 |
} |
| 17 |
|
| 18 |
# Always end with this (adjust the bug info) |
| 19 |
SetVersion( $DBversion ); |
| 20 |
print "Upgrade to $DBversion done (Bug 23590 - Add lastmodificationby and lastmodificationdate to the suggestions table)\n"; |
| 21 |
} |