Can't seem to find this anywhere, even though it looks like it should be very intutive. I'm writing a new version of a block, with DB changes but can't see how or when the function blockname_upgrade($oldversion) gets called. I've got this function in a blockname/db/mysql.php and also in blockname/db/upgrade.php. I've also got parallel functions called xmldb_blockname_upgrade, but none seem to be invoked by my admin/index.php (I've put in echo-die statements just to see, but none executed)
And where would the $oldversion value be taken from when the function is called?