1 $DBversion = 'XXX'; # will be replaced by the RM
2 if( CheckVersion( $DBversion ) ) {
3 if( !column_exists( 'suggestions', 'lastmodificationby' ) ) {
5 ALTER TABLE suggestions ADD COLUMN lastmodificationby INT(11) DEFAULT NULL AFTER rejecteddate
9 ALTER TABLE suggestions ADD CONSTRAINT `suggestions_ibfk_lastmodificationby` FOREIGN KEY (`lastmodificationby`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
12 if( !column_exists( 'suggestions', 'lastmodificationdate' ) ) {
14 ALTER TABLE suggestions ADD COLUMN lastmodificationdate DATE DEFAULT NULL
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";