I'm just trying to script some checks on my moodle but I'm not able to find where in the database moodle keeps track of the versions for each of the plugins?
Does someone have this info, or have a spec sheet of some sort for the moodle database?
For historical reasons, the plugin version numbers is stored in different places for different types of plugins.
For a lot of plugins, it is stored in the config_plugins table.
For modules, blocks, and a few other types, it is stored in other tables like modules.
You can get docs on the Moodle database by going to Admin -> Development -> XMLDB in a Moodle 2.0 install, and clicking the [Doc] link.