Resolution: Won't Fix
Affects Version/s: 1.6
Fix Version/s: None
If you delete some module from the blocks directory (under dirroot) and then, as admin, you navigate to the Admin/Blocks page and delete the block, the block itself is properly deleted from the block table but their instances (block_instance) remains!
Although it's not critical, we should perform some house-cleaning to purge block_instances of orphaned records.
Everytime the admin arrive to the Admin/Blocks page, the records (block_instances ) returned by this query should be deleted:
FROM block_instance bi
WHERE NOT EXISTS (
FROM block b
WHERE b.id = bi.blockid)
(test it under moodle.org, there are some orphans there too)