I have noticed that Alfresco while starting up checks to see if the database is up-to-date and if not runs scripts to update the database. How does Alfresco keep track of the code to db mapping/ version numbers. And, what does it use to apply only the relevant scripts.